FxCop 间接引用 System.Core 版本 2.0.5.0

编程入门 行业动态 更新时间:2024-10-24 07:33:20
本文介绍了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

本文发布于:2023-11-04 01:05:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1556533.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   System   FxCop   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!