0

I'm having an issue with the WPF Designer. At some point I did something that broke all of my controls that reference the local assembly. The application builds and runs just fine, but the VS Designer throws errors every time that a local resource is referenced via a clr-namespace.

For instance, I have the following reference:

xmlns:Converters="clr-namespace:MyAssembly.Converters;assembly="

Note that I left off the assembly=MyAssembly because its the local/current.

Then when I reference it in a resources block:

<Converters:IsNotNullConverter x:Key="isNotNull"/>

This was all working up until today. At some point I did something which broke all of the references with the following error:

Undefined CLR Namespace. The 'clr-namespace' URI refers to a namespace 'MyAssembly.Converters' that is not included in the assembly.

I've tried cleaning, rebuilding, restarting VS, closing the designer panes, and all combinations of these 4. It's most likely some other minor issue that is causing the whole thing to blow up (as happens too often in WPF). My problem is that I have no idea how to begin to break this problem down.

Does anyone have any insights or techniques for finding the real issue with this design-time problem? Right now I'm basically going file by file and hoping I can find the needle in the haystack.

Thanks!

Adam
  • 1,126
  • 9
  • 24

1 Answers1

1

"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. "

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

I had it set to x64 because of a 3rd party DLL requirement...gonna be tricky. Oh well. Thanks!

Community
  • 1
  • 1
Adam
  • 1,126
  • 9
  • 24