Wednesday, September 22, 2010

Error when referencing assembly from network share - Silverlight 4 (.NET Framework 4.0)

I got this error today when I added reference to an assembly from network share:

"Error 3 Could not load the assembly file://\\CM\libraries\Microsoft\Rx\Reactive Extensions v1.0.2677.0\SL4\System.Observable.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust".

I am using Silverlight 4 (.NET Framework 4.0).

To fix this issue I added following entry in the Visual Studio 2010 devenv.config file.

< loadFromRemoteSources enabled="true" />
To the runtime section of:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config