我在WP7中为聊天应用写这个,我需要把它放在项目
上<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">
我收到此错误
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
需要我添加一个程序集或什么??
答案 0 :(得分:1)
执行xmlns:Controls="clr-namespace:Chat.Controls"
意味着您正在使用当前程序集的本地名称空间(与该XAML相同的项目),但编译器表示它不存在。
因此,您要么拥有错误的命名空间,要么在命名空间后缺少程序集(类似于xmlns:Controls="clr-namespace:Chat.Controls;assembly=Chat.Controls"