nServiceBus .Net 4.0 和 MEF

发布于 2024-09-12 09:21:40 字数 584 浏览 2 评论 0原文

所以最近几天我一直在修补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 技术交流群。

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

发布评论

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

评论(3

奢望 2024-09-19 09:21:40

即使您使用的是最新版本,您也可能会遇到 NServiceBus 和 .NET Framework 4.0 的一些问题。如果你碰巧看到这个:

System.NotSupportedException:尝试从网络位置加载程序集,这会导致程序集在早期版本的 .NET Framework 中被沙箱化。

您必须通过添加以下部分来编辑您的配置:

  <runtime> <loadFromRemoteSources enabled="true"/>   </runtime>

更多信息在此处。

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:

System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework.

You must edit your configuration by adding the following section:

  <runtime> <loadFromRemoteSources enabled="true"/>   </runtime>

More information in here.

Bonjour°[大白 2024-09-19 09:21:40

我瞎了……就在这里-> 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

不醒的梦 2024-09-19 09:21:40

您可以从强制您使用 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.

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