FxCop 分析未找到间接引用的程序集 - GAC 问题? [英] FxCop analysis not finding indirectly-referenced assemblies - GAC issue?

查看:27
本文介绍了FxCop 分析未找到间接引用的程序集 - GAC 问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在针对 FxCop 运行我的 DLL,它返回了如图所示的问题(它还抱怨 System.Windows.Browser 和 System.Core,相同版本):

I am running my DLL against FxCop and it is returning problems as seen in the image here (It also complains about System.Windows.Browser and System.Core, same versions):

我已经告诉 FxCop 搜索 GAC,但它没有帮助.我的项目中确实引用了 System.Runtime.Serialization,但它显示为版本 4.0.0.0.我在任何地方都没有看到这个特定版本的文件.

I have told FxCop to search the GAC and it isn't helping. I do have System.Runtime.Serialization referenced in my project but it is showing as version 4.0.0.0. I do not see this particular version of the file anywhere.

虽然我可以跳过它意味着当我在 Visual Studio 中使用 FxCop Integrator 时它会失败,而且我不知道如果我尝试集成到自动构建中会发生什么.

Although I can skip it means it fails when I use FxCop Integrator in Visual Studio and I don't know what would happen if I tried to integrate into a automatic build.

但更重要的是,我很好奇你是如何修复它的,因为我不喜欢不明白出了什么问题.

But more to the point I am curious as to how you fix it as I don't like not understanding whats wrong.

推荐答案

2.0.5.0 版的 BCL DLL 是 Silverlight 4 的一部分,您可能尚未在开发机器上安装它.由于您可能没有使用面向 Silverlight 的 Esri.ArgGIS.Client.dll 程序集部分,因此您可以放心地忽略该警告.

BCL DLLs with version 2.0.5.0 are part of Silverlight 4, which you presumably have not installed on your dev machine. Since you are presumably making no use of the parts of the Esri.ArgGIS.Client.dll assembly that target Silverlight, you could probably safely ignore the warning.

FxCop Integrator 似乎有一个关于此问题的未决问题,因此您有三个基本选择:

There seems to be an open issue for FxCop Integrator regarding this problem, so you have three basic choices:

  1. 保持原样,并希望 FxCop Integrator 很快会引入忽略这些警告的选项,
  2. 停止使用 FxCop Integrator,或
  3. 安装 Silverlight 4.

对于自动构建,行为将取决于您的构建平台.与其试图猜测自动构建中可能会发生什么,不如继续尝试一下?

For automated builds, the behaviour will depend on your build platform. Instead of trying to guess what might happen in an automatic build, why don't you go ahead and try it?

这篇关于FxCop 分析未找到间接引用的程序集 - GAC 问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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