zl程序教程

您现在的位置是:首页 >  系统

当前栏目

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

Windows in The not &# 39 be type
2023-09-11 14:22:25 时间

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

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