问题描述
我有一个使用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:
System.Core,版本= 2.0.5.0,文化=中性,PublicKeyToken = 7cec85d7bea7798e,可重定位=是
这会在我们的CI服务器上导致以下错误:
This causes the following error on our CI server:
有没有办法告诉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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!