Partager via


Configuring a COM Application for Side-By-Side Execution 

An application configuration file enables a COM application to bind to a specific managed component and specify which version of the runtime runs the component. COM application developers can create a .NET-based application configuration file and deploy it with their applications.

Managed and unmanaged applications use the identical configuration file schema to specify a version of the runtime and to bind to a specific component. Win32 application configuration files are slightly different and cannot be substituted for .NET-based files. For file naming and location requirements, see Application Configuration Files.

Specifying the Runtime Version

Without an application configuration file, the latest compatible runtime version installed on the computer is loaded by default. If this behavior does not satisfy the requirements of your COM application, you can use the <supportedRuntime> element in an application configuration file to specify the runtime version that your application requires. For example, you can specify runtime version 1.0.3705, which loads the .NET Framework version 1.0. For instructions, see Targeting a .NET Framework Version.

NoteNote

COM applications hosted by an extensible host, such as Microsoft Internet Explorer or Microsoft Office cannot control which version of the runtime is loaded.

Specifying an Assembly Version

Without an application configuration file, the runtime loads the latest version of the assembly registered in the Windows registry that contains the type to be activated from COM. You can use the <bindingRedirect> element in an application configuration file to direct your application to bind to an earlier assembly version. For instructions, see Redirecting Assembly Versions.

You can redirect more than one assembly version by including multiple <bindingRedirect> elements within a <dependentAssembly> element.

See Also

Concepts

Runtime Initialization from a COM Application
Version-Dependent Registry Keys
Applying Version-Dependent Attributes
COM Components and Side-By-Side Execution

Other Resources

Side-By-Side Execution for COM Interop