The 'clr-namespace' URI refers to a namespace that is not included in the assembly

后端 未结 10 1922
醉梦人生
醉梦人生 2020-12-02 18:32

I\'m trying to include in my XAML some classes which convert values. However, I\'m getting the following error when I compile:

Undefined CLR namespac

相关标签:
10条回答
  • 2020-12-02 18:54

    Check that your build configuration has the Project selected for build in your current (Active) build configuration.

    I just had this problem after fiddling with the Build architecture (from x86 to x64) and the main wpf project had been de-selected.

    0 讨论(0)
  • 2020-12-02 18:56

    Visual Studio keeps reverting back to the odd assembly file paths. Just delete the actual reference file it's referring to and then add it to the project

    0 讨论(0)
  • 2020-12-02 18:57

    I had the same error. But apparently, it was just because of the path of the solution that I was trying to build. My path/directory/folder name contains some spaces.

    0 讨论(0)
  • 2020-12-02 18:58

    I have ran into this issue on a C# WPF project. It seems to be generated when you closed the project with last attempt with Errors of any kind during your project not even in the relevant Namespace in issue in XAML.

    The solution to this is to fix all .CS files (Or exclude the problematic XAML/CS files) to get a running version Rebuild and run.

    It took me close to 3 hours to figure that the Debug version that the designer seems to be running on must be faulty. This is why in many cases people resolved this with Rebuild project, but in cases that you have existing code errors in project the issue will not resolve it self since the Rebuild fails to complete and does not replace the designer supported version.

    hoped this helps!

    0 讨论(0)
提交回复
热议问题