Uch*_*chi 3 .net c# wpf xaml compiler-errors
我正在尝试构建我的项目,但不断收到以下错误消息:
Error 1 The type 'System.Windows.Markup.IQueryAmbient' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\Geoff\Git\My Shopping List\My Shopping List\RunWindowItemList.xaml.cs 24 26 My Shopping List
Error 2 The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.Markup'. This type has been forwarded to assembly 'System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Consider adding a reference to that assembly. C:\Users\Geoff\Git\My Shopping List\My Shopping List\obj\Debug\RunWindowItemList.g.cs 40 91 My Shopping List
我尝试在MSDN上查找如何解决此问题,但没有发现任何东西。如果有人可以为我提供解决方案或提供解决方案的文章,我将不胜感激!
小智 5
检查项目中使用的System.Xaml.dll版本,并与该项目的.net版本进行比较。似乎您使用的是旧版本System.Xaml.dll。您可以在文件夹C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework.NETFramework中找到其他dll。