Deployment Tools Foundation
Specifying the Runtime Version
Development Guide > Managed CAs > Writing CAs > CustomAction.config

Every managed custom action package should contain a CustomAction.config file, even though it is not required by the toolset. Here is a sample:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup>
            <supportedRuntime version="v2.0.50727"/>
        </startup>
    </configuration>

The configuration file follows the standard schema for .NET Framework configuration files documented on MSDN.

Supported Runtime Version

In the startup section, use supportedRuntime tags to explicitly specify the version(s) of the .NET Framework that the custom action should run on. If no versions are specified, the chosen version of the .NET Framework will be the "best" match to what Microsoft.Deployment.WindowsInstaller.dll was built against.

Warning: leaving the version unspecified is dangerous as it introduces a risk of compatibility problems with future versions of the .NET Framework. It is highly recommended that you specify only the version(s) of the .NET Framework that you have tested against.

Other Configuration

Various other kinds of configuration settings may also be added to this file, as it is a standard .NET Framework application config file for the custom action.

See also:

- Writing Managed Custom Actions
- Building Managed Custom Actions
- Proxy for Managed Custom Actions