简体   繁体   中英

Designer not able to show XAML (the type 'local:… was not found)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM