启动 NServiceBus 时出现问题

发布于 2024-10-07 04:03:37 字数 441 浏览 0 评论 0原文

我创建了一个非常简单的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

临走之时 2024-10-14 04:03:37

嗯,看起来对 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

罪歌 2024-10-14 04:03:37

看起来像手动将重载中的程序集添加到 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文