的FxCop和GAC疯狂 [英] FxCop and GAC Madness

查看:132
本文介绍了的FxCop和GAC疯狂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用FxCop的,当我尝试分析依赖于模式与实践项目,企业库数据(其中包括)2.0.0.0 - 的FxCop抱怨说,它不能:找到组件参考 - 即使被分析的应用程序DLL在遵守对这个版本和它在GAC。如果我浏览到GAC尽量选择相同的组件(我选中的版本和公钥标记)的FxCop不会让我开放了。该应用程序成功运行并绝对会让使用的问题的dll

Using FxCop when I try to analyze projects that rely on Patterns and Practices, Enterprise Library Data (among others) 2.0.0.0 - FxCop complains that it can’t: "Locate Assembly Reference" - even though the application dll being analyzed was complied against this version and its in the GAC. If I browse to the GAC try to select the same assembly (I've checked version and public key token) FxCop won't allow me "open" it. The application succeeds in running and definitely makes use of the problem dll.

操作系统:既看Vista和Windows XP上。
版本:Visual Studio 2005和2008年的FxCop 1.36
应用是符合VS2005的.NET 2.0

OS: Seen on both Vista and Windows XP. Versions: Visual Studio 2005 and 2008. FxCop 1.36 Application is complied with VS2005 for .NET 2.0.

我如果有同样的问题,我尝试浏览与反射器应用程序的DLL。

I have the same problem if I try to browse the application dll with Reflector.

显然不认为这是针对其编译的程序集的版本相同。有谁知道为什么吗?一个解决方案有什么建议?我缺少什么?

Clearly it doesn't think this is the same version of the assembly its compiled against. Does anyone know why? Any suggestions for a solution? What am I missing?

推荐答案

检查的这个(的FxCop)和(反射镜)了。

Check this (FxCop) and this (Reflector) out.


在FxCop的,您可以选择< STRONG>项目 - 选项... - 拼写和放大器;分析 - (检查)搜索全局程序集缓存缺少引用

In FxCop, you can select Project - Options... - Spelling & Analysis - (check) Search Global Assembly Cache for missing references


在反射器中,可以选择
查看 - 选项... - 浏览器 - (检查)的自动解析引用

In Reflector, you can select View - Options... - Browser - (check) Automatically resolve references


我觉得有点奇怪,这些选项默认不启用。

I find it kind of weird that these options are not enabled by default.

这篇关于的FxCop和GAC疯狂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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