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
Post a Comment