FxCop 和 GAC 疯狂

发布于 2024-07-20 15:04:29 字数 429 浏览 3 评论 0原文

当我尝试分析依赖于模式和实践、企业库数据(以及其他)2.0.0.0 的项目时使用 FxCop - FxCop 抱怨它不能:“定位程序集引用” - 即使正在分析的应用程序 dll 是根据其编译的此版本及其在 GAC 中。 如果我浏览到 GAC 尝试选择相同的程序集(我已检查版本和公钥令牌),FxCop 将不允许我“打开”它。 应用程序成功运行并且肯定使用了有问题的 dll。

操作系统:在 Vista 和 Windows XP 上均可见。 版本:Visual Studio 2005 和 2008。FxCop 1.36 应用程序符合VS2005 for .NET 2.0。

如果我尝试使用 Reflector 浏览应用程序 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.

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.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写给空气的情书 2024-07-27 15:04:29

检查( FxCop)和这个(Reflector)。


在 FxCop 中,您可以选择项目 - 选项... - 拼写和拼写检查。 分析 -(检查)搜索全局程序集缓存以查找缺失的引用


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


我发现默认情况下未启用这些选项有点奇怪。

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


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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文