简体   繁体   English

C#“系统”版本更新

[英]C# “System” version update

I'm in C# in Visual Studio running 2015 Update 3. 我在运行2015 Update 3的Visual Studio中使用C#。

I'm using a dll that I made myself for the backend of a system, and in the references of the project, one shows the "System" as Version 2.0.5 and the project being used as a dll shows it as 4.0.0. 我使用的是我自己制作的dll,用于系统的后端,在项目的引用中,一个将“系统”显示为2.0.5版,而被用作dll的项目将其显示为4.0.0。 。 I believe this is the cause of a conflict that is preventing me from running this app. 我认为这是导致我无法运行此应用程序的冲突的原因。 How do I update just the system version or even specify it so I can make them the same? 如何仅更新系统版本甚至指定系统版本,以便使它们相同?

I think you should go to the references of your project containing the old reference, remove System and add it with version 4.0.0.0. 我认为您应该转到包含旧参考的项目参考,删除System并将其添加为4.0.0.0版。 However, you should also check that target .NET framework versions match (maybe the older dll is obtained compiling against .NET framework 2.0 and the newest one against .NET framework 4.0). 但是,您还应该检查目标.NET Framework版本是否匹配(也许是根据.NET Framework 2.0编译了较旧的dll,而针对.NET Framework 4.0编译了最新的dll)。

In order to find out the cause that is preventing you from running the application (you should provide what is happening), an useful tool is Assembly Binding Log Viewer which will show the exact assemblies that the application is trying to load (fully qualified assembly names). 为了找出阻止您运行应用程序的原因(您应提供所发生的事情),一个有用的工具是程序集绑定日志查看器 ,它将显示应用程序试图加载的确切程序集(完全合格的程序集名称) )。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM