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

查看:94
本文介绍了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,版本= 2.0.5.0,文化=中性,PublicKeyToken = 7cec85d7bea7798e,可重定位=是

这会在我们的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.0 \ Team Tools \ Static Analysis Tools \ FxCop

  • C:\ Program Files(x86)\ Microsoft Visual Studio 12.0 \ Team Tools \ Static Analysis Tools \ FxCop

问题已经解决.

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

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