Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined CLR namespace

Tags:

wpf

I have the following:

Error! Error!

The error says The 'clr-namespace' URI refers to a namespace '{0}' that is not included in the assembly.

I've build and rebuild but nothing happens. I'm sure this must work, because a WPF demo app that I downloaded has everything the same. What's going on?

like image 984
Garth Marenghi Avatar asked Mar 29 '11 09:03

Garth Marenghi


4 Answers

Assuming your ViewModel folder isn't empty (or there actually is a type with BlooblieBlablie.ViewModel as its namespace), and BlooblieBlablie is the assembly name, the following should work:

xmlns:vm="clr-namespace:BlooblieBlablie.ViewModel;assembly=BlooblieBlablie"
like image 197
Willem van Rumpt Avatar answered Nov 10 '22 11:11

Willem van Rumpt


I had similar problem when project's solution platform was set to x64. When I changed it to x86 problem went away.

Here is some explanation: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6379d330-f382-4b4d-a690-e89326ab4c72

like image 10
Maciej Rogoziński Avatar answered Nov 10 '22 12:11

Maciej Rogoziński


I had the same problem and solved it by not having my project in a path with hash-mark.

E.g D:#Temp had to be D:\Temp

I guess there's someone at Microsoft having missed an EscapedCodeBase in conjunction with the URI.

like image 3
Daniel Avatar answered Nov 10 '22 10:11

Daniel


I had the same error message given to me. But the underlying problem was different. I moved my MainWindow.xaml to a different folder, and I forgot to update my App.xaml StartupUri. I then updated my StartupUri in my App.xaml and the problem was fixed.

like image 2
Cloud9999Strife Avatar answered Nov 10 '22 10:11

Cloud9999Strife