I get stung on a recurring basis by this, and of course always at the worst moment. When I edit a xaml file, I receive this error
(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.)
I added the recommended elements in devenv.exe.config
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>
which is supposed to get rid of that, but does not work for me. Should I add this elsewhere ? How does the system knows in the first place that this was downloaded from the internet ? How can I get rid of that warning ?
I added the XML to other config files as well (XDesProc.exe.config and XDesProc.exe.appx.config) and it solved the problem for me:
Go to C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE
Open the files XDesProc.exe.config, devenv.exe.config, and XDesProc.exe.appx.config using a text editor (likely requires administrator mode)
Find </runtime> and before it, add <loadFromRemoteSources enabled="true"/> (If you copy/paste, make sure the doublequotes come through as ASCII or VS will have a fit)
(Source: http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/)
(Similar question: WPF designer fails to load in VS 11 beta)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With