I am running into two issues when I try to use the EventStore.ClientAPI.Embedded nuget package. I am guessing that they are related.
- When I don’t also add the EventStore.ClientAPI nuget package, I get the following error:
System.TypeInitializationException was unhandled
_HResult=-2146233036
_message=The type initializer for ‘EventStore.Core.Messaging.MessageHierarchy’ threw an exception.
HResult=-2146233036
IsTransient=false
Message=The type initializer for ‘EventStore.Core.Messaging.MessageHierarchy’ threw an exception.
Source=EventStore.ClientAPI.Embedded
TypeName=EventStore.Core.Messaging.MessageHierarchy
StackTrace:
at EventStore.Core.Bus.InMemoryBus…ctor(String name, Boolean watchSlowMsg, Nullable`1 slowMsgThreshold)
at EventStore.Core.ClusterVNode…ctor(TFChunkDb db, ClusterVNodeSettings vNodeSettings, IGossipSeedSource gossipSeedSource, ISubsystem[] subsystems)
at EventStore.ClientAPI.Embedded.EmbeddedVNodeBuilder.op_Implicit(EmbeddedVNodeBuilder builder)
at Runner.Program.Main(String[] args) in c:\Proofs\Proof.EventStore.AzureCloudService\Runner\Program.cs:line 23
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Reflection.ReflectionTypeLoadException
_HResult=-2146232830
_message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
HResult=-2146232830
IsTransient=false
Message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source=mscorlib
StackTrace:
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at EventStore.Core.Messaging.MessageHierarchy.<.cctor>b__1(Assembly assembly)
at System.Linq.Enumerable.d__31`3.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at EventStore.Core.Messaging.MessageHierarchy…cctor()
InnerException:
- When I do add the reference, I am able to run the server, but I get a “Error during execution of command: Unexpected TCP package: BadRequest…” message when using the EventStore.TestClient against it even though the ping command works. Here is the console output from the EventStore.TestClient:
ES VERSION: 3.0.0.0 (master/51cef1881b1c5ab5e3962fb61bffac1dc99ec506, Wed, 17 Sep 2014 16:42:34 +01
OS: Windows (Microsoft Windows NT 6.2.9200.0)
RUNTIME: .NET 4.0.30319.34209 (64-bit)
GC: 3 GENERATIONS
LOGS: C:\Projects\Atomic\EventStore\EventStore.Server\EventStore-OSS-Win-v3.0.0\es-logs
HELP: False ()
VERSION: False ()
LOG: ()
CONFIG: ()
DEFINES: ()
WHAT IF: False ()
IP: 127.0.0.1 (Command Line)
TCP PORT: 100 (Command Line)
HTTP PORT: 2113 ()
TIMEOUT: -1 ()
READ WINDOW: 2000 ()
WRITE WINDOW: 2000 ()
PING WINDOW: 2000 ()
FORCE: False ()
COMMAND: ()
ping
Segments count: 1, buffers count: 512, should be when full: 512
[06180,05,16:45:48.946] Processing command: ping.
[06180,06,16:45:48.980] [127.0.0.1:100]: PING…
[06180,03,16:45:49.038] [127.0.0.1:100]: PONG!
[06180,05,16:45:49.038] Command exited with code 0.
WRFL 1 1000
[06180,05,16:45:56.050] Processing command: WRFL 1 1000.
[06180,05,16:45:57.051] Error during execution of command: Unexpected TCP package: BadRequest…
[06180,05,16:45:57.051] Command exited with code 1.
Here is what my program looks like: