WPF Compiling for 64 Bit – undefined clr namespace

I was building a rough WPF application on my 64 bit Windows 7 box and it uses the 64 bit Oracle client so I set my solution to compile as 64 bit. When adding references to even local assemblies in my XAML I kept getting this undefined clr namespace error.

I searched around for a bit and found a few links that didn’t help. Most of them dealt with people referring to namespaces that were in non-local assemblies, but what I wanted to use was a local class. I had a simple namespace reference like this…

xmlns:local="clr-namespace:TPPMonitor"

and it wouldn’t work. At least, it wouldn’t work in the designer. Everything compiled fine.

Finally I read down a bit on this thread and found the solution to this issue.

It seems as if VS2010 can’t use reflection to query 64 bit assemblies in the designer. Switching to x86 in my solution settings enabled me to use the designer properly (which I kind of wanted to do because it was easier to setup a DataGrid using the designer than by hand).

Leave a Reply

Your email address will not be published. Required fields are marked *