NES(.NET事件源)示例异常(使用NServiceBus 2.0)

时间:2011-09-16 06:22:25

标签: cqrs event-sourcing

我正在使用开箱即用的NES样本。然后我将NServiceBus 2.5版本与旧的2.0交换,但这会在启动MVC应用程序时导致以下错误:

“对象引用未设置为对象的实例。”    在NES.EventConverterFactory..ctor()    在NES.DI.&lt; .cctor&gt; b_ 6()在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DI.cs:第24行    在NES.DependencyInjectionContainer.ResolveTService在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DependencyInjectionContainer.cs:第20行    在NES.DependencyInjectionContainer。&lt;&gt; c _DisplayClass4 2.<Register>b__3() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 45 at NES.DependencyInjectionContainer.Resolve[TService]() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20 at NES.DependencyInjectionContainer.<>c__DisplayClassa 4.b_ 9()在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DependencyInjectionContainer.cs:第59行    在NES.DependencyInjectionContainer.ResolveTService在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DependencyInjectionContainer.cs:第20行    在NES.DependencyInjectionContainer。&lt;&gt; c _DisplayClass4`2.b__3()在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DependencyInjectionContainer.cs :第45行    在NES.DependencyInjectionContainer.ResolveTService在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ DependencyInjectionContainer.cs:第20行    在NES.UnitOfWorkFactory.Begin()在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ UnitOfWorkFactory.cs:第18行    在NES.NServiceBus.MessageModule.HandleBeginMessage()在C:\ Users \ werner \ Downloads \ elliotritchie-NES-9a56ad8 \ elliotritchie-NES-9a56ad8 \ src \ NES \ NServiceBus \ MessageModule.cs:第10行    在NServiceBus.Unicast.UnicastBus.TransportStartedMessageProcessing(Object sender,EventArgs e)    在NServiceBus.Unicast.Transport.Msmq.MsmqTransport.ReceiveFromQueue()    在NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Process()

现在,当Global.asax.cs点击“AreaRegistration.RegisterAllAreas();”时会发生这种情况。最后,错误发生在“EventConverterFactory.cs”第13行中,静态构造函数尝试迭代“Global.TypesToScan”,这是空的。

有谁知道如何获得这个样本?奇怪的是,完全相同的代码似乎适用于NSB 2.5程序集......

沃纳

1 个答案:

答案 0 :(得分:0)

看起来好像是在一个尚未使用.NES()扩展名初始化的端点中处理消息。