Friday, April 9, 2010

Error message when load assembly in Visual Studio 2010 Silverlight 4 project

Error 1 The "ValidateXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'XXX.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'XXX.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.


A solutions posted by krohling here:

Microsoft Silverlight Media Framework - Discussions - SL4 Support:

Right click on each ***.dll file in Windows Explorer
Uncheck 'Read Only'
Click 'Unblock'

I believe this is because Windows does not initially trust files that you download from the internet.

For additional information about this: http://www.petri.co.il/unblock-files-windows-vista.htm

No comments: