简体   繁体   English

我的项目引用了3个不同版本的mscorlib.dll

[英]My project references 3 different versions of mscorlib.dll

I noticed that one of my projects references 3 different versions of mscorlib: 我注意到我的一个项目引用了3个不同版本的mscorlib:

  1. 1.0.5000.0
  2. 2.0.0.0
  3. 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. 这篇关于“mscorlib.dll和System.dll ”的帖子帮助我理解了mscorlib的用途,但我想知道应用程序是否正常/必需要求此程序集的多个版本。 Perhaps this happened because I upgraded my project from VS 2005 to VS 2010. 也许这是因为我将我的项目从VS 2005升级到VS 2010。

Is it possible for me to make my project only reference the 4.0.0.0 version of mscorlib? 是否有可能让我的项目仅引用mscorlib的4.0.0.0版本?

There are many reasons why you could end up like that. 有很多原因可以让你最终得到这样的结果。 If you only want v4.0, make sure you 如果你只想要v4.0,请确保你

  • Start with a fresh project in VS 2010 从VS 2010中的新项目开始
  • Import all your existing code files into this new project 将所有现有代码文件导入此新项目
  • If you have third party references (such Oracle data access), make sure you use their .Net v4.0 dlls 如果您有第三方参考(例如Oracle数据访问),请确保使用他们的.Net v4.0 dll

Alternatively, you can remove references to all components that might be referencing older versions of mscorlib. 或者,您可以删除对可能引用旧版mscorlib的所有组件的引用。 This may not be possible as all vendors may not upgrade their components to totally v 4.0 这可能是不可能的,因为所有供应商可能无法将其组件升级到完全v 4.0

Personally, I wouldn't worry about them unless they are root cause of a major bug (which is unlikely). 就个人而言,我不会担心它们,除非它们是一个主要错误的根本原因(这是不可能的)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 mscorlib.dll 中的 System.UnauthorizedAccessException - System.UnauthorizedAccessException in mscorlib.dll 在 mscorlib.dll 中发生 System.StackOverflowException 类型的未处理异常 - An unhandled exception of type System.StackOverflowException occurred in mscorlib.dll 在mscorlib.dll中永久发生的System.Threading.ThreadAbortException - System.Threading.ThreadAbortException occurred in mscorlib.dll occuring persitently 编译器错误消息:CS0009-mscorlib.dll - Compiler Error Message: CS0009 - mscorlib.dll 处理asp:ScriptManager时mscorlib.dll中的ExecutionEngineException(80131506) - ExecutionEngineException (80131506) in mscorlib.dll when processing asp:ScriptManager 如何解决 mscorlib.dll 中发生 System.FormatException' 但未在用户代码中处理 - How to solve System.FormatException' occurred in mscorlib.dll but was not handled in user code UserManager.Create:mscorlib.dll中发生类型'System.MissingMethodException'的异常,但未在用户代码中处理 - UserManager.Create: An exception of type 'System.MissingMethodException' occurred in mscorlib.dll but was not handled in user code 创建 json 文件时,mscorlib.dll 中发生了“System.OutOfMemoryException”类型的异常,但未在用户代码中处理 - An exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll but was not handled in user code, while creating json file 使用Response.Redirect()时出现“抛出异常:mscorlib.dll中的'System.Threading.ThreadAbortException'” - “Exception thrown: 'System.Threading.ThreadAbortException' in mscorlib.dll” when using Response.Redirect() mscorlib.dll中发生了类型为'System.Runtime.Serialization.SerializationException'的未处理异常 - An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM