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

别等时光非礼了梦想. 提交于 2019-12-01 09:55:07

问题


I am learning data binding in xaml and this xmlns problem is stopping me. My cs code is in namespace "Ping". Here is my MainWindow.xaml:

<Window x:Class="Ping.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:custom="clr-namespace:WPFDemo;assembly=WPFDemo"
    xmlns:local="clr-namespace:Ping"

The last line complains as in the title. Why is it not working? I am using "Ping" and it's the only namespace I got.

Thanks


回答1:


If Ping is the only namespace you're using, you should remove the reference to WPFDemo



来源:https://stackoverflow.com/questions/7130143/wpf-xmlns-the-clr-namespace-uri-refers-to-a-namespace-that-is-not-included-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!