我的项目引用了 3 个不同版本的 mscorlib.dll
我注意到我的一个项目引用了 3 个不同版本的 mscorlib:
1.0.5000.0
2.0.0.0
4.0.0.0
此关于“ mscorlib.dll 和 System.dll”帮助我了解了 mscorlib 的用途,但我想知道应用程序需要此程序集的多个版本是否正常/必要。也许发生这种情况是因为我将项目从 VS 2005 升级到 VS 2010。
我可以让我的项目仅引用 4.0.0.0 版本的 mscorlib 吗?
I noticed that one of my projects references 3 different versions of mscorlib:
1.0.5000.0
2.0.0.0
4.0.0.0
This post about "mscorlib.dll & System.dll" helped me understand what mscorlib is for, but I'm wondering whether it's normal/necessary for an application to require multiple versions of this assembly. Perhaps this happened because I upgraded my project from VS 2005 to VS 2010.
Is it possible for me to make my project only reference the 4.0.0.0 version of mscorlib?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
造成这种结果的原因有很多。如果您只需要 v4.0,请确保
(例如Oracle数据访问),确保
您使用其 .Net v4.0 dll
或者,您可以删除对可能引用旧版本 mscorlib 的所有组件的引用。这可能是不可能的,因为所有供应商可能不会将其组件完全升级到 v 4.0
就我个人而言,我不会担心它们,除非它们是重大错误的根本原因(这不太可能)。
There are many reasons why you could end up like that. If you only want v4.0, make sure you
(such Oracle data access), make sure
you use their .Net v4.0 dlls
Alternatively, you can remove references to all components that might be referencing older versions of mscorlib. This may not be possible as all vendors may not upgrade their components to totally v 4.0
Personally, I wouldn't worry about them unless they are root cause of a major bug (which is unlikely).