wpf无法加载程序集的元数据 可能已从web下载--解决办法!
![此博文包含图片](https://i-blog.csdnimg.cn/blog_migrate/a4c26d1e5885305701be709a3d33442f.gif)
最近遇到了一个问题,自己在笔记本上写的一个wpf程序,源代码放到别的电脑上,设计器加载就会出现问题,网上查了好久,最终还是在微软官网上找到了结局方案:以下就是解决方案,只需要对你所引用或者额外加载的dll文件进行“接触锁定”操作就行了。
解除锁定步骤:找到你的dll->右键属性->通用选项卡->解除锁定即可。
This topic shows how to use an assembly that you download from the Web in Visual Studio. For security reasons, Visual Studio
Caution |
---|
Unblocking an assembly that is downloaded from the Web gives it Full Trust. Only unblock assemblies that you trust. |
To unblock a Web assembly
-
Close Visual Studio.
-
Using Windows Explorer, browse to the assembly that you downloaded from the Web.
-
Right-click the assembly, and from the shortcut menu, select
Properties. The
Properties dialog box opens. -
On the
General tab, click the Unblock button to indicate that this assembly is trusted The
Unblock button will not appear if the assembly is already unblocked and available. -
Click
OK to close the Properties dialog box. -
Restart Visual Studio and open your project.
You should now be able to browse to the assembly in the
Choose Items or Add Reference dialog boxes.