将项目从VS2008更新到VS2012后,程序崩溃,因为需要4.0 dll [英] After updating a Project from VS2008 to VS2012 the program crashes because a 4.0 dll is required

查看:99
本文介绍了将项目从VS2008更新到VS2012后,程序崩溃,因为需要4.0 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我将用VS2008编写的.NET 3.5解决方案升级到VS2012。 (只需在VS2012中打开解决方案)



一切顺利,代码可以编译。

运行代码时,IDE呈现以下Errormessage:

Hello,

I upgraded a .NET 3.5 Solution written in VS2008 to VS2012. (Simply by opening the solution in VS2012)

Everything went fine, the code can be compiled.
When running the code the IDE presents me the following Errormessage:

Location:<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.Daimler.Sisam.UI.SBE.FormSBE
End Sub
 
Error: An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.



似乎系统找不到System.Drawing.dll 4.0。为此应该安装(框架4.0和4.5存在)我不明白为什么系统正在寻找它。每个引用都设置为Drawing 2 dll。

我想坚持使用框架3.5和包含的Drawing 2 dll。我不想要任何更高框架的参考,因为它不会出现在安装软件的PC上。



你知道为什么会这样吗?我能做什么?



非常感谢



祝你好运



Jens



从下面的非解决方案复制的其他信息

谢谢为你的答案,

这些设置是我检查的第一个,它们都是3.5

....

还有其他任何想法吗?


It seems that the System cannot find the System.Drawing.dll 4.0. For this should be installed (Framework 4.0 and 4.5 are present) I don't understand why the System is looking for it. Every reference is set to the Drawing 2 dll.
I want to stick to framework 3.5 and the contained Drawing 2 dll. I don't want any reference to a higher framework because it will not be present on the PCs where the software will be installed.

Do you know why this happens and what I can do?

Thank you very much

Best regards

Jens

additional information copied from non-solution below
Thanks for your answers,
These settings were the First I checked and they all were 3.5
....
Any other ideas?

推荐答案

你好,



已经有一段时间了但是我找到了解决方案我认为我在这里发布了任何人都有同样的问题。



所以帮助我的是用.NET 4.5编译项目作为目标。然后将其设置回3.5并再次编译。



最好的问候





Jens
Hello,

it's been a while but for I found the solution I thought I post it here in case anybody has the same problem.

So what helped me was to compile the Project with .NET 4.5 as target. Then set it back to 3.5 and compile again.

Best Regards


Jens


这篇关于将项目从VS2008更新到VS2012后,程序崩溃,因为需要4.0 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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