Running a JScript Application on a Previous Version of the Common Language Runtime

Unless otherwise specified, a JScript application is built to run with the common language runtime version that the compiler uses to build the application. However, it is possible for an .exe or ASP.NET Web application built with one version of the runtime to run on any version of the runtime.

Accommodating Other Runtime Versions

To accomplish this, an .exe application needs an app.config file containing runtime version information (with the supportedRuntime tag). Other Visual Studio languages offer Integrated Development Environment (IDE) support for modifying the app.config file via their project's property pages dialog box. For example, modify the SupportedRuntimes property of a Visual C# windows application and use that updated app.config file in your JScript application.

At runtime, the name of the app.config file must be filename.ext.config (where filename.ext is the name of the executable that started the application) and the file must be in the same directory as the executable. For example, if your application is called TestApp.exe, the app.config file would be named TestApp.exe.config.

If you specify more than one runtime version and the application runs on a computer with more than one installed runtime version, the application uses the first version specified in the config file that matches an installed runtime that is available on the system.

For more information, see How to: Use an Application Configuration File to Target a .NET Framework Version.

Since JScript ASP.NET Web pages are single-file Web Form pages, they are not precompiled to a .dll with a dependency on the .NET Framework assembly associated with the compiler. Consequently, pages are compiled at runtime and no runtime version information is required in a web.config file.

See Also

Reference

SupportedRuntimes Property

Concepts

ASP.NET Web Page Code Model