我收到这条消息:
Host doesn't support hosting of multiple endpoints. Endpoint classes found: foo.bar.Service.Endpoint.PublisherConfig, foo.bar.Service.Endpoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, foo.bar.Service.Endpoint.PublisherConfig, foo.bar.Service.Endpoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null You may have some old assemblies in your runtime directory. Try right-clicking your VS project, and selecting 'Clean'.
我曾尝试清理该项目,但没有成功。如果我关闭 VS 并重建解决方案,它会工作一次,然后再次停止工作。这也是我能在网上找到的唯一解决方案。
我觉得奇怪的是,它好像说它找到了同一个端点两次?
编辑:我查看了 bin 文件夹和创建的文件。我找到了这些文件:
foo.bar.Service.Endpoint.dll foo.bar.Service.Endpoint.mm.dll
将其与同事的 bin 文件夹进行比较,他没有带有 .mm.dll 的文件,并且他的工作正常。系统不同,我跑的是win8,他跑的是win7。都在 vs2012 和相同的源代码等...
当我删除 .mm.dll 文件时,它可以正常运行,但在重建时它会再次出现。
最佳答案
您的问题不是 NServiceBus,而是 Mighty Moose (ContinuousTests)。
MM 正在您的 bin/Debug 文件夹中创建一个名为 [assemblyname].mm.dll 的文件。禁用 MM,您应该没问题(仅暂停 MM 引擎是不够的)。
关于c# - nservicebus - 多个端点错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14197184/