在写WPF时编译后出现这个错误, 但可以编译通过,提示错误的文件是app.xaml错误提示:错误 18 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。 E:\C#\oa\ZHao.OA\app.xaml 1 1 ZHao.OA
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/up-compatibility/2006"
xmlns:local="clr-namespace:ZHao.OA"
xmlns:p="clr-namespace:ZHao.OA.Purchasing"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:helper="clr-namespace:ZHao.OA.Helpers"
mc:Ignorable="d" x:Class="ZHao.OA.App"
StartupUri="Login.xaml">
上面是app.xaml开头的代码, 后面还有很多定义资源模板之类的
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/up-compatibility/2006"
xmlns:local="clr-namespace:ZHao.OA"
xmlns:p="clr-namespace:ZHao.OA.Purchasing"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:helper="clr-namespace:ZHao.OA.Helpers"
mc:Ignorable="d" x:Class="ZHao.OA.App"
StartupUri="Login.xaml">
上面是app.xaml开头的代码, 后面还有很多定义资源模板之类的
好混乱。试想下,如果你住的城市有2条路叫一个名字,比如xx路。现在有个包裹,让你送到xx路1号,那么你就迷惑了,是哪条路的1号。
xmlns:System换个名字试试