我经常被这种情况刺痛,当然总是在最糟糕的时刻。
当我编辑 xaml 文件时,收到此错误
(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.)
我添加了受到推崇的devenv.exe.config 中的元素
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>
这应该可以摆脱它,但对我不起作用。
我应该在其他地方添加这个吗?
系统首先如何知道这是从互联网下载的?
我怎样才能摆脱这个警告?
我还将 XML 添加到其他配置文件(XDesProc.exe.config 和 XDesProc.exe.appx.config),它为我解决了问题:
转到 C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE
使用文本编辑器打开文件 XDesProc.exe.config、devenv.exe.config 和 XDesProc.exe.appx.config(可能需要管理员模式)
找到 并在其前面添加 (如果复制/粘贴,请确保双引号通过,因为 ASCII 或 VS 会合适)
(来源:http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/)
(类似问题:WPF 设计器无法在 VS 11 beta 中加载)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)