场景:Visual Studio写WPF项目时,想要生成XML文件,默认的WPF项目没有引入System.XML这个dll。在【解决方案资源管理器——引用】右键添加了System.XML引用后,运行项目得到这个报错。

The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.Markup'

The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.Markup'

原因:导入System.XML后,其中有部分内容又依赖于System.Xaml这个dll。

解决方法:所以继续添加System.Xaml的引用到项目中即可。

 

启发:https://stackoverflow.com/questions/4387812/visualstudio-bug

相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-06-20
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
猜你喜欢
  • 2021-09-09
  • 2021-05-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
相关资源
相似解决方案