I have .NET 2.0 runtime installed, then I installed the .NET 4.0 runtime, so I have both. When I run a .NET app, is there a way to force which runtime will be used?
Edit/Clarification: I meant w/o regards to how the application was built. I am under the assumption that the .NET 4.0 runtime can run a .NET program compiled 5 years ago that targeted the 2.0 runtime (oldprogram.exe). So now I am on a machine with both runtimes, either of which could handle oldprogram.exe. Which runtime is chosen? Can I influence which runtime is chosen?
NET Framework are the Common Language Runtime and the . NET Framework Class Library. The Common Language Runtime (CLR) is the execution engine that handles running applications.
You may try to uninstall and reinstall the latest version of . net framework and check. Ignore the error message, perform the resolution provided in the article.
Yes, use the <supportedRuntime>
element in the .exe.config file. For example:
<configuration> <startup> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
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