Force an application to run under specific .NET runtime version? -


i have .net 2.0 runtime installed, installed .net 4.0 runtime, have both. when run .net app, there way force runtime used?

edit/clarification: meant w/o regards how application built. under assumption .net 4.0 runtime can run .net program compiled 5 years ago targeted 2.0 runtime (oldprogram.exe). on machine both runtimes, either of could handle oldprogram.exe. runtime chosen? can influence runtime chosen?

yes, use <supportedruntime> element in .exe.config file. example:

<configuration>    <startup>       <supportedruntime version="v2.0.50727"/>    </startup> </configuration> 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -