启动 NServiceBus 时出现问题
我创建了一个非常简单的 NServiceBus 控制台应用程序来发送消息。但是,我无法启动总线,因为它抱怨有关“对象引用未设置到对象实例”的非常模糊的错误。
Configure config = Configure.With();
config = config.DefaultBuilder();
config = config.BinarySerializer();
config = config.UnicastBus();
IStartableBus startableBus = config.CreateBus();
IBus Bus2 = startableBus.Start(); // **barf**
这让我发疯,我错过了什么?我认为 DefaultBuilder 应该填补任何空白?
I've created a very simple NServiceBus console application to send messages. However I cannot start the bus as it complains with a very vague error about 'Object reference not set to an instance of an object'.
Configure config = Configure.With();
config = config.DefaultBuilder();
config = config.BinarySerializer();
config = config.UnicastBus();
IStartableBus startableBus = config.CreateBus();
IBus Bus2 = startableBus.Start(); // **barf**
It's driving me mad, what am I missing? I thought the DefaultBuilder should be filling in any blanks?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,看起来对 ncqrs.NserviceBus 的引用导致它出错,即使我实际上还没有使用它
Hmm, looks like a reference to ncqrs.NserviceBus is causing it to go wrong even though I'm not actually using it yet
看起来像手动将重载中的程序集添加到 With() 就成功了,不确定是什么让它心烦意乱,但那是另一天的事情了
Looks like manually adding the Assemblies in the overload to With() did the trick, not sure what's upsetting it but that's for another day