首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

这个是什么东东

2012-03-29 
这个是什么错误?在写WPF时编译后出现这个错误, 但可以编译通过,提示错误的文件是app.xaml错误提示:错误 18

这个是什么错误?
在写WPF时编译后出现这个错误, 但可以编译通过,提示错误的文件是app.xaml

错误提示:

错误 18 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。 E:\C#\oa\ZHao.OA\app.xaml 1 1 ZHao.OA

C# code
<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/markup-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个库,都叫System.Windows,里面都有这么个类。。。
好混乱。

试想下,如果你住的城市有2条路叫一个名字,比如xx路。现在有个包裹,让你送到xx路1号,那么你就迷惑了,是哪条路的1号。
[解决办法]
貌似第二个和第三个。
[解决办法]
你将" xmlns:System="clr-namespace:System;assembly=mscorlib" 
 xmlns:System换个名字试试
[解决办法]
还是要好好系统学习一下

热点排行