【发布时间】:2011-04-29 12:29:11
【问题描述】:
我有一个包含大约 10 个项目的解决方案,我自己还没有编写任何内容,但我将在这里接手一个项目。作为主要项目的项目基于 WPF。当我尝试运行这个项目时,我得到以下编译器错误:
The tag 'RoutingManagerView' does not exist in XML namespace 'clr-namespace:RoutingManager.Views;assembly=RoutingManager'. Line 29 Position 14. C:\Source\WSA\WsaClient\Views\MainView.xaml 29 14 WsaClient
然后,如果我双击此错误消息,打开 xaml,并加载设计器,但未加载设计器,我又收到 3 条错误消息:
Unable to load the metadata for assembly 'WsaClient'. This assembly may have been downloaded from the web. See @987654321@. The following error was encountered during load: Could not load file or assembly 'WsaClient' or one of its dependencies. The system cannot find the file specified. C:\Source\WSA\WsaClient\Views\MainView.xaml 1 1 WsaClient
Unable to load the metadata for assembly 'RoutingManager'. This assembly may have been downloaded from the web. See @987654322@. The following error was encountered during load: Could not load file or assembly 'RoutingManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. C:\Steria\Forsvaret\P6088\Source\WSA\WsaClient\Views\MainView.xaml 1 1 WsaClient
The type 'Views:RoutingManagerView' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Source\WSA\WsaClient\Views\MainView.xaml 29 14 WsaClient
我用谷歌搜索了它,许多人认为这是因为 DLL 来自互联网,因此被锁定。但是在我的情况下,我没有 DLL。它抱怨作为解决方案一部分的两个项目,WsaManager 和 RoutingManager。我在 USB 笔上的 zip 文件中获取了所有源代码,并且我已将其解压缩到我的 C 盘上的某个位置,因此无法远程访问代码。
如果有人之前遇到过相同或类似的问题,我将非常感谢您在此处提供有关如何解决此问题的任何指示。
编辑
XAML 文件的这一行给出了最后一条错误消息:
<Views:RoutingManagerView DataContext="{Binding Dependency}"/>
在 XAML 文件的顶部,这是程序集的导入:
xmlns:Views="clr-namespace:RoutingManager.Views;assembly=RoutingManager"
【问题讨论】:
-
您是否尝试过该链接中提供的解决方案 - go.microsoft.com/fwlink/?LinkId=179545
-
我不确定我是否明白这个笑话。 “大约 0 个项目”是什么意思?
-
@sehe 和 Cody Gray - 不是开玩笑。现在编辑成10个项目,这也是我写的初衷。
-
Stecya - 是的,我已经确保没有文件被标记为被阻止,所以不幸的是,这不是我的问题。
-
好吧,这更有意义。我看到原始评论“为大约 0 个项目 +1”已被删除。混乱得到缓解。
标签: c# .net compilation