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?
Yes. You can install and run multiple versions of the . NET Framework on a computer. You can install the versions in any order.
You may need the .NET Framework 3.5 to run an app on Windows 11, Windows 10, Windows 8.1, and Windows 8. You can also use these instructions for earlier Windows versions.
Here we show you how to solve this issue. First, you can check if the component is already installed on your device. Go to Control Panel > Programs > Turn Windows features on or off, verify if . NET Framework 3.5 checkbox is selected and then proceed with the software installation.
You have to change the runtime .NET version in file App.config
/web.config
to:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With