升级到最新的 NServiceBus 和 NServiceBus温莎城堡
我正在尝试获取最新的 nservicebus 和 castle Windsor:
我的问题是,现在运行的确切代码 - 不再运行:
var _container = new WindsorContainer();
NServiceBus.Configure.With()
.CastleWindsorBuilder(_container)
.XmlSerializer()
.MsmqTransport()
.UnicastBus()
.DoNotAutoSubscribe();
是的 - 那是旧的示例代码,仍然在 3.0 的源代码中
实际的代码我我试图运行的是:
var container = new WindsorContainer(new
XmlInterpreter("Windsor.config"));
container.Install(FromAssembly.This());
Configure.With()
.Log4Net()
.XmlSerializer()
.CastleWindsorBuilder(container)
.MsmqTransport()
.IsTransactional(true)
.PurgeOnStartup(false)
.MsmqSubscriptionStorage()
.UnicastBus()
.ImpersonateSender(false)
.LoadMessageHandlers()
.IsTransactional(true)
.CreateBus().Start();
其中没有更多内容,但认为额外的位可能会导致 问题 - 即使是最简单的尝试 温莎集装箱让它痛苦地死去。
错误是:
Component 89374c5e-29e5-4506-ba2e-5618fdc0d786 could not be
registered. There is already a component with that name. Did you want
to modify the existing component instead? If not, make sure you
specify a unique name.
我实际上并没有注册任何东西,所以 NSB 必须尝试注册某些东西两次?
w://
I'm trying to get to the latest of nservicebus and castle windsor:
My issue is that now the exact code that did run - no longer does:
var _container = new WindsorContainer();
NServiceBus.Configure.With()
.CastleWindsorBuilder(_container)
.XmlSerializer()
.MsmqTransport()
.UnicastBus()
.DoNotAutoSubscribe();
Yep - that's the old example code that is still in the source for 3.0
The actual code I'm trying to run is:
var container = new WindsorContainer(new
XmlInterpreter("Windsor.config"));
container.Install(FromAssembly.This());
Configure.With()
.Log4Net()
.XmlSerializer()
.CastleWindsorBuilder(container)
.MsmqTransport()
.IsTransactional(true)
.PurgeOnStartup(false)
.MsmqSubscriptionStorage()
.UnicastBus()
.ImpersonateSender(false)
.LoadMessageHandlers()
.IsTransactional(true)
.CreateBus().Start();
Not much more in it but thought the extra bits might cause the
problem - even the most simple attempt at getting it started with the
windsor container makes it die a painful death.
The error is:
Component 89374c5e-29e5-4506-ba2e-5618fdc0d786 could not be
registered. There is already a component with that name. Did you want
to modify the existing component instead? If not, make sure you
specify a unique name.
It's not like I'm actually registerign anything so NSB must be trying to reg something twice maybe?
w://
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 nsb/castle 中的一个已知错误。现在固定在master上
This is a known bug in nsb/castle. Fixed on the master now