设计器无法显示 XAML(未找到类型“本地:...") [英] Designer not able to show XAML (the type 'local:... was not found)

查看:44
本文介绍了设计器无法显示 XAML(未找到类型“本地:...")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题似乎与这个问题完全相同:

解决方案

我将继续回答我自己的问题,它可能会在未来帮助其他人.

找了好久才发现:

<块引用>

Visual Studio 不支持从不可靠的位置加载文件.

我已将该项目复制到网络存储磁盘,但它无法正常工作.一旦我将项目复制到本地磁盘,它就开始工作了.

My issue seems to be the exact same one as this question: "Unable to load the metadata" errors when loading a project But since it is not answered I will ask my own question.

I am using Microsft Visual C# 2010 Express to open a project. No errors at first but when I open an xaml file I get the following errors:

Error   4   The type 'local:IndexConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    MainWindow.xaml 19  26  AppInventoryMvvm
Error   5   The type 'local:EditResourceMultiParamConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.   MainWindow.xaml 39  26  AppInventoryMvvm
Error   6   The type 'local:AddResourceMultiParamConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    MainWindow.xaml 54  26  AppInventoryMvvm
Error   7   The type 'local:IndexConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    MainWindow.xaml 96  30  AppInventoryMvvm
Error   8   The type 'local:IndexConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    MainWindow.xaml 112 30  AppInventoryMvvm

As you can see all the errors look the same and the code where it is complaining looks like this:

<local:IndexConverter x:Key="IndexConverter" />

Now I am using the exact same version of IDE together with SP and so on as my other colleagues, (I am also opening the exact same project as them) it is a total mystery to me why I can view the design! any ideas?

To see the exact errors and code, please see the screen dump below:

解决方案

I am going to go ahead and answer my own question, it might help other people in the future.

After a long time searching I found out that:

Visual Studio doesn't support loading files from unreliable locations.

I had copied the project to a network storage disk and it just would not work. As soon as I copied the project to a local disk it started working.

这篇关于设计器无法显示 XAML(未找到类型“本地:...")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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