【问题标题】:CS1684 Reference to Type System.Windows.Input.ICommand claims it is defined in 'xxx' but could not be foundCS1684 对 System.Windows.Input.ICommand 类型的引用声称它在“xxx”中定义但找不到
【发布时间】:2012-08-19 06:13:18
【问题描述】:

我正在尝试开始使用 VS 2012 而不是 VS 2010,但在安装 VS 2012 和 .Net 4.5 之后。我在 VS 2010 中遇到代码分析错误,说读取模块“xxx_Accessor”时遇到以下错误:无法解析类型引用:[System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089] System.Windows。输入.ICommand。

我猜这与 .Net 4.5 移动了 ICommand 接口的位置有关,但是有没有解决方案以便再次运行代码分析?我尝试将ignorestrongassemblynames添加到测试项目和被测项目的项目文件中,但没有奏效。

【问题讨论】:

标签: visual-studio-2010 code-analysis visual-studio-2012 .net-4.5 icommand


【解决方案1】:

我也遇到了同样的问题,但不是所有引用 ICommands 的程序集,只是一些。

我删除了对 PresentationCore 的引用,重新构建并重新添加了它。问题消失了。

【讨论】:

    猜你喜欢
    • 2018-11-23
    • 2018-09-12
    • 2018-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-07
    相关资源
    最近更新 更多