“无法加载元数据"加载项目时出错 [英] "Unable to load the metadata" errors when loading a project

查看:39
本文介绍了“无法加载元数据"加载项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 xaml 的新手,很久以前我就提交了一个应用程序.这是一个小项目,没有什么花哨或困难,这是我的第一个 xaml/wpf 项目,我在一个周末就完成了.我最近检索了代码.应用程序仍在构建和运行,但设计器不会加载.xaml 文件中存在错误.我不记得以前有过这些错误.第一个错误是:

I'm a newbie to xaml and I had made an application a long time ago. It is a small project, nothing fancy or difficult, it was my first xaml/wpf project and I had made it in just a week end. I retrieved the code recently. The application still builds and runs, but the designer doesn't load. There are errors in the xaml file. I don't recall having these errors before. The first one of these errors is:

无法加载程序集MyProject"的元数据.这个程序集可能是从网上下载的.请参阅 http://go.microsoft.com/fwlink/?LinkId=179545.加载期间遇到以下错误:无法加载文件或程序集MyProject"或其依赖项之一.不支持操作.(来自 HRESULT 的异常:0x80131515)C:\visualStudioWorkspace\MyProject\MyProject\MainWindow.xaml 1 1 MyProject

我试图访问提到的网址,但我什么都不懂.我不是从网上下载的.我不知道什么是集会".我尝试在我的项目中浏览一些随机文件,但没有一个在各自的文件属性中具有他们正在谈论的取消阻止"按钮.

I tried to go to the url mentioned, but I didn't understand any of it. I didn't download it from the web. I don't know what a 'assembly' is. I tried going through a few random files in my project but none had this "unblock" button they're talking about in their respective files properties.

然后在xaml中有大约10个错误,所有这些都与这个相似:

Then there's around 10 errors in the xaml, all of which are similar to this one:

未找到类型local:ClickSelectTextBox".验证您没有缺少程序集引用并且所有引用的程序集都已构建.C:\visualStudioWorkspace\MyProject\MyProject\MainWindow.xaml 351 22 MyProject

我该怎么做才能解决这个错误?

What can I do to solve this error ?

谢谢

推荐答案

Windows 通过为这些文件创建备用数据流"来跟踪文件是否可能已从 Web 下载.对于名为 myfile.txt 的文件,其来源信息将存储在名为 myfile.txt:Zone.Identifier:$DATA 的数据流中.要取消阻止 myfile.txt 并使 Windows 不再担心您从何处获取文件,您只需删除此备用数据流.

Windows keeps track of whether files may have been downloaded from the web by creating 'alternate data streams' for these files. For a file named myfile.txt, the information about where it came from will be stored in a data stream named myfile.txt:Zone.Identifier:$DATA. To unblock myfile.txt and make Windows stop worrying about where you got the file from, you just have to delete this alternate data stream.

您可以使用 Sysinternals Streams 实用程序来查找并摆脱这些备用数据流.

You can use the Sysinternals Streams utility to find and get rid of these alternate data streams.

这篇关于“无法加载元数据"加载项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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