views:

114

answers:

3

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?)

A: 

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

Peter
+1  A: 

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.

Mikael Koskinen
Thanks, some nice info behind that link
Peter
A: 

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.

Chris Stavropoulos