Application crash after moving from .NET 3.5 to .NET 4.0
Recently I upgraded .NET from 3.5 to 4.0 in my desktop application. On my development machine it works fine.
On some production machines it crashes right at start.
Windows 8.1, Windows 7
Problem Event Name: APPCRASH
Application Name: myApp.exe
Application Version: 2.0.0.0
Application Timestamp: 553a56e8
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.3.9600.17415
Fault Module Timestamp: 54504ade
Exception Code: e0434f4d
Exception Offset: 00014598
OS Version: 6.3.9600.2.0.0.256.4
Locale ID: 1045
Windows XP SP3 with .NET 4.0
Faulting application myApp.exe, version 2.0.0.0, stamp 553a56e8, faulting module kernel32.dll, version 5.1.2600.6532, stamp 53203b53, debug? 0, fault address 0x00012fd3.
Please note that the source is .NET Runtime 2.0 Error . Why?
The application is compiled in .NET 4.0, which is installed on the machine.
Another (much smaller and simpler) application from this solution, which is also compiled for .NET 4.0 works fine.
Any ideas?
您必须将文件App.config
/ web.config
的运行时.NET版本更改为:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
链接地址: http://www.djcxy.com/p/92500.html