다음을 통해 공유


How Do I: Configure Runtime Version

Syed Aslam Basha here from the Information Security Tools Team.

At times I need to test application with different versions of .NET. We can configure application config file and make the application to use the .NET version specified in the config file.

For example, suppose we have application built with .NET 3.5 and want to check the compatibility with .NET 4.0 follow the below steps;

  • Open applicationname.exe.config file which will be under application path
  • Update supported runtime version to appropriate value as shown below
  • If config file not present create a one as applicationname.exe.config
  • Add  the following xml node
  1: <configuration>
  2:   <startup>
  3:       <supportedRuntime version="v4.0.21006"/>
  4:   </startup>
  5: </configuration>
  • Save the file
  • Now run the application, it runs on .NET 4.0

-Syed Aslam Basha ( syedab@microsoft.com )

Microsoft Information Security Tools (IST) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.