I have written a small utility to collect system data and output it to a text box. Nothing complex at all, the purpose is to audit a users machine in preparation for a software rollout.
I can't say what version of .NET a user will be operating, so when I created the solution I selected framework 2.0.
Debug and testing the released EXE on my machine is fine. When I load it onto an XP machine with only has .NET 4.0 (full) it refuses to run, advising me that I need to install .NET 2.0. I then updated the release to 3.0 but this did the same thing.
I have .NET 4.0 on the machine, why can't this application run with a greater version installed and how can I make the application execute under all .NET versions?
What I did in the past was to add the following settings to the "*.exe.config" file of my .NET 2.0 application:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
The supportedRuntime
element specifies which versions of the .NET runtime your applications can run under.
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