Share via


How Do I: Configure Runtime Version

Syed Aslam Basha here. I am a tester on  the Information Security Tools Team.

At times I need to test an application with different versions of the .NET framework. You can configure the application config file to force 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
  • If its not present create a one
  • 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