FxCop 间接引用 System.Core 版本 2.0.5.0 [英] FxCop indirect reference to System.Core version 2.0.5.0

查看:28
本文介绍了FxCop 间接引用 System.Core 版本 2.0.5.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Autofac 和 WebAPI 集成的项目

I've got a project that uses Autofac, and the WebAPI integration

我们在我们的解决方案上运行 FxCop,在打开 autofac 时,我得到以下信息:

We run FxCop over our solution, and on opening autofac, I get the following:

找不到以下间接引用的程序集.这个分析不需要组装,但是,没有它,分析结果可能不完整.这个汇编被引用Autofac.dll

The following indirectly-referenced assembly could not be found. This assembly is not required for analysis, however, without it, analysis results could be incomplete. This assemble was referenced by Autofac.dll

System.Core,Version=2.0.5.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e,Retargetable=Yes

这会导致我们的 CI 服务器出现以下错误:

This causes the following error on our CI server:

FxCop 返回代码 (516):PROJECT_LOAD_ERROR ASSEMBLY_REFERENCES_ERROR

FxCop return code (516): PROJECT_LOAD_ERROR ASSEMBLY_REFERENCES_ERROR

有没有办法告诉 FxCop 忽略这个?

Is there a way to tell FxCop to ignore this?

推荐答案

在我们的项目中遇到了与 AutoMapper 3.1.0 相同的问题.真正的问题是旧版本的 FxCop.最后一个官方版本是 FxCop 10.0,但自 2012 年以来,新版本的 FxCop 已与 Visual Studio 捆绑在一起.我刚刚用可以在以下位置找到的版本替换了 FxCop 10.0:

Had the same issue with AutoMapper 3.1.0 on our project. The real problem is an old version of FxCop. The last official release was FxCop 10.0, but new versions of FxCop have been bundled with Visual Studio since 2012. I just replaced the FxCop 10.0 with the version that can be found in:

  • C:Program Files (x86)Microsoft Visual Studio 11.0Team ToolsStatic Analysis ToolsFxCop

  • C:Program Files (x86)Microsoft Visual Studio 12.0Team ToolsStatic Analysis ToolsFxCop

问题就解决了.

这篇关于FxCop 间接引用 System.Core 版本 2.0.5.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆