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

后端 未结 10 1975
醉梦人生
醉梦人生 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: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!

提交回复
热议问题