I am new to NServiceBus. I have download the latest build from NSERvice bus website. When i run the PUBLISH Subscribe sample, i get the following error. I have no idea whats going wrong. All assemblies are there. May be it is with in the framework.
Can anyone shed some light in it?
NServiceBus.Host.Internal.GenericHost <(null)> - System.IO.FileLoadException: Could not load file or assembly file:/enter code here //C:\NServiceBus.net 4.0\samples\PubSub\Subscriber1\bin\Debug\NServiceBus.Core. dll or one of its dependencies. Operation is not supported. (Exception from HRE SULT: 0x80131515)
In .NET 4, there are restrictions on running "unfamiliar" assemblies. You will probably need to add a NServiceBus.Host.exe.config with the following which will allow the assemblies to run:
<configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <runtime> <loadFromRemoteSources enabled="true"/> </runtime> </configuration>
If you're using Windows 7 then You need to unblock the assemblies as they have been flagged as being untrustworthy. The easiest way (without adding config files) is to right click on the zipped NServiceBus download, select properties and hit the "Unblock" button:
Now when you uncompress the archive it should build and run in Visual Studio 2010 without the error message you are receiving.
User contributions licensed under CC BY-SA 3.0