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
rebuild the solution and the error will go away.
I figured out what was wrong. Although visual studio showed this as the first error, there were indeed other errors with my coding which prevented the converters from being assembled. Thus, when VS went to find the assembly, it was not there.
some problem with vs2008 designer
do this:
now there wont be any errors.
I just solved this by changing the target from x64 to x86. Apparently Visual Studio is 32bit process and it's unable to load 64bit assemblies, and if your assembly is targeting x64 platform and you adding some custom control visual studio is unable to load it and throws this message.
I was able to reproduce your issue:
I created a simple WF in .NET Framework 4.0. Renamed the xaml file. As part of renaming the xaml file you have to manually rename the workflow runtime name when calling the Invoke on the WorkflowInvoker object. I build the project. I got the error "The 'clr-namespace' URI refers to a namespace 'System' that is not included in the assembly."
How I fixed it:
I open the project property page. For some reason, the target framework was switch from .NET framework 4.0 to 4.0 client version. So, I selected .NET 4.0 and rebuilt the project. The error is not there anymore.
If you reference to an external project, you must specify the assembly as it appears in your project's references:
xmlns:mdls="clr-namespace:MyProject.Models;assembly=MyProject.Models"