loadFromRemoteSources enabled =“true” // XAML设计师// VS 11 beta和2012 RC [英] loadFromRemoteSources enabled="true" // XAML designer // VS 11 beta and 2012 RC

查看:4143
本文介绍了loadFromRemoteSources enabled =“true” // XAML设计师// VS 11 beta和2012 RC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被这个经常性的引用,当然总是在最坏的时刻。
当我编辑一个xaml文件,我收到这个错误

 (System.NotSupportedException:试图加载来自网络位置的程序集,这将导致程序集在以前版本的.NET Framework中被沙箱此版本的.NET Framework默认情况下不启用CAS策略,因此此加载可能是危险的,如果此加载是不打算沙箱装配,请启用loadFromRemoteSources开关。有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=155569。)

我在devenv中添加了推荐的元素.exe.config

 < configuration> 
<运行时>
< loadFromRemoteSources enabled =true/>
< / runtime>
< / configuration>

这是应该摆脱的,但不适合我。
我应该在其他地方添加吗?
系统如何知道这是从互联网下载的?
我如何摆脱这个警告?

解决方案

我将XML添加到其他配置文件(XDesProc .exe.config和XDesProc.exe.appx.config),它解决了我的问题:


  1. 转到C: \Program Files\Microsoft Visual Studio 11.0\Common7\IDE


  2. 打开文件XDesProc.exe.config,devenv.exe.config和XDesProc.exe.appx.config使用文本编辑器(可能需要管理员模式)


  3. 查找< / runtime>之前添加< loadFromRemoteSources启用=true/>(如果您复制/粘贴,请确保双引号通过ASCII或VS将适合)


(来源: http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/



(类似que stion: WPF设计师无法在VS 11 beta中加载


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:

  1. Go to C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE

  2. Open the files XDesProc.exe.config, devenv.exe.config, and XDesProc.exe.appx.config using a text editor (likely requires administrator mode)

  3. 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)

这篇关于loadFromRemoteSources enabled =“true” // XAML设计师// VS 11 beta和2012 RC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆