Amin
Amin

Reputation: 172

Undefined namespace windows phone 7

I write this for chat app in WP7, and I need to put it on project

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

                xmlns:Controls="clr-namespace:Chat.Controls">

and I get this error

Error   7   Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Chat.Controls' that is not included in the assembly.    C:\Users\Amin\Documents\Visual Studio 2010\Projects\Chat\Chat\WP7_Chat\Control.xaml 4   36  Chat

Need I to add an assembly or what??

Upvotes: 0

Views: 423

Answers (1)

Pedro Lamas
Pedro Lamas

Reputation: 7233

Doing xmlns:Controls="clr-namespace:Chat.Controls" means that you're using a namespace local to the current assembly (in the same project as that piece of XAML), but the compiler says that it doesn't exist.

So either you have the wrong namespace, or you're missing the assembly after the namespace (something like xmlns:Controls="clr-namespace:Chat.Controls;assembly=Chat.Controls"

Upvotes: 1

Related Questions