Here is an interesting one. I have a small executable file that was created for .NET 2.0 to make it work on a wide variety of platforms. This is a single assembly program and refers only to System spaces. * Namespaces.
When I run it on an OS with .NET 2.0 installed, it works fine. It will not work on OS with only .NET 4.0 installed due to the new runtime introduced with .NET 4.0. As a result, I added the supported runtime information to the app.config file, as described here . I added two supported runtimes:
<supportedRuntime version="2.0.50727" /> <supportedRuntime version="4.0" />
Now, when I run the application on a system with .NET 2.0 installed, it does not start:

It doesnβt matter in which order the supported runtimes are supported, different from the order of the requested versions in the error message to reflect the changes in app.config (so the CLR obviously picks this information correctly), I have .NET 2.0 installed, and it claims that I need to install .NET 2.0! I tried to restore the installation of .NET 2.0 with no luck. I reproduced this behavior on a second machine.
What could be causing the failure?
source share