Unhandled exception in VS2010 SP1

Jul 22, 2011 at 7:43 PM

I installed the XmlVisualizer.dll in MyDocuments\Visual Studio 2010\Visualizers and when I select "" to visualize and Xml node, I get the following exception:

System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Serge\Documents\Visual Studio 2010\Visualizers\XmlVisualizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Serge\Documents\Visual Studio 2010\Visualizers\XmlVisualizer.dll' ---> 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. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

Has anyone seen this before?

Has anyone gotten it to work with SP1?

What network location is it referring to?

Thanks.

Jul 22, 2011 at 7:50 PM

To answer myself. I downloaded the version from Code Project at http://www.codeproject.com/KB/XML/XMLVisualizer/XmlVisualizerDLL2010.zip and this one worked without any problems.

Strange....

Coordinator
Jul 22, 2011 at 9:48 PM

I haven't seen this problem before. The version on Codeproject and the version here on Codeplex should be identical.

I am glad that you got it to work.

Apr 17, 2012 at 6:29 PM

I just ran into this.  The problem is a security counter measure inside windows.  When you download some files directly from the internet, they have reduced security permissions. 

To override the security default behavior after the download, right click on the DLL in Windows Explorer and select "Properties".  At the bottom of the properties page, there is a button that says "Unblock".  Click it and click ok.  Now the extension will load in Visual Studio.