nServiceBus .Net 4.0 和 MEF
所以最近几天我一直在修补nServiceBus。
这里有一些我想知道的事情。
如何获得与 .net 4.0 兼容的版本?我正在使用 NServiceBus.2.0.0.1145,我认为它是最新的,但我需要将示例解决方案转换为 VS2010(工作正常),但它们的目标框架是 3.5。此外,当我使用 nSB 和 .Net 4.0 创建新项目时,整个事情都会陷入混乱,直到我将目标框架设置为 3.5。
我喜欢MEF。 MEF 是 .net 4.0 的一部分。 (http://msdn.microsoft.com/en- us/library/dd409230(VS.100).aspx) 我看到 nSB 允许我使用我自己的容器等,但显然我不能在没有源重新编译和我拥有的任何其他 jiggery pokery 的情况下将它与 nSB 一起使用使其在 .net 4.0 上运行需要做的事情。
那么nSB有没有计划迁移到framework 4.0呢? (或者它已经存在于网站上但我还没有找到它?)
So I've been tinkering in the last few days with nServiceBus.
Here a few things that I want to know.
How do I get a version that will play nice with .net 4.0? I'm using NServiceBus.2.0.0.1145 which I believe is the lastest but I needed to convert the sample solutions to VS2010 (which works fine) but their target framework is 3.5. Also when I create new projects using nSB and .Net 4.0 the whole thing goes into a spin until I set the target framework to 3.5.
I like MEF. MEF is part of .net 4.0. (http://msdn.microsoft.com/en-us/library/dd409230(VS.100).aspx) I see nSB allows me to use my own containers etc. but obviously I can't use it with nSB without a source recompile and whatever other jiggery pokery I have to do to make it work on .net 4.0.
So is there any plan to move nSB to framework 4.0? (or does it exist already on the website and I just haven't found it yet?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
即使您使用的是最新版本,您也可能会遇到 NServiceBus 和 .NET Framework 4.0 的一些问题。如果你碰巧看到这个:
您必须通过添加以下部分来编辑您的配置:
更多信息在此处。
You may encounter some problems with NServiceBus and .NET Framework 4.0 even though you're using the latest version. If you happen to see this:
You must edit your configuration by adding the following section:
More information in here.
我瞎了……就在这里-> http:// teamcity.codebetter.com/guestAuth/repository/download/bt206/13534:id/NServiceBus.2.0.0.1219.zip?userKey=guest 上,你猜对了 下载页面 -> nservicebus.com/Downloads.aspx
I'm blind ... it's here -> http://teamcity.codebetter.com/guestAuth/repository/download/bt206/13534:id/NServiceBus.2.0.0.1219.zip?userKey=guest on, you guessed it The Downloads Page -> nservicebus.com/Downloads.aspx
您可以从强制您使用 loadFromRemoteSources 标记的文件中删除流。只需获取 Sysinternals Streams util (http://technet.microsoft.com/en -us/sysinternals/bb897440.aspx)并使用它从文件中擦除流数据。
话虽这么说,NSB 仍然不能与 .net4 一起正常工作。我花了一天的大部分时间试图让测试处理程序为我的单元测试工作,但没有成功。
You can remove the streams from the files that are forcing you to use the loadFromRemoteSources tag. Just grab the Sysinternals Streams util (http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx) and use it to wipe out the streams data from the files.
That being said, NSB still doesn't work right with .net4. I've spent the better part of a day trying to get the test handler stuff working for my unit tests with no success.