Concepts of Isolated Applications and Side-by-side Assemblies
An application is considered an isolated application if all of its components are side-by-side assemblies. A side-by-side assembly is a collection of resources—a group of DLLs, windows classes, COM servers, type libraries, or interfaces—available for an application to use at runtime. Typically, a side-by-side assembly is one to several DLLs. For example, the C Runtime Library assembly contains three DLLs—msvcr90.dll, msvcm90.dll and msvcp90.dll—and is used by applications when they are built using functions from the CRT library.
Shared or private
A side-by-side assembly can be either shared or private. Shared side-by-side assembliesmay be used by multiple applications that specify, in their manifests, a dependence on the assembly. Multiple versions of side-by-side assemblies can be shared by different applications running at the same time. A private assembly is an assembly that is deployed with an application and is available for the exclusive use of that application. Private assemblies are installed in the folder containing the application's executable file or one of its subfolders.
Manifests and search order
Both isolated applications and side-by-side assemblies are described by manifests. A manifest is an XML document that can be an external XML file or embedded inside an application or an assembly as a resource. The manifest file of an isolated application is used to manage the names and versions of shared side-by-side assemblies to which the application should bind at run time. The manifest of a side-by-side assembly specifies names, versions, resources, and dependent assemblies of side-by-side assemblies. For a shared side-by-side assembly, its manifest is installed in the WinSxS\Manifests folder. In the case of a private assembly, it is recommended to include its manifest in the DLL as a resource with ID equal to 1, and the name of the private assembly may be the same as the name of the DLL. For more information, see Private Assemblies.
At execution time, Windows uses assembly information from the application's manifest to search and load the corresponding side-by-side assembly. If an isolated application specifies an assembly dependency, the operating system first searches for the assembly among the shared assemblies in the WinSxS folder. If the required assembly is not found, the operating system then searches for a private assembly installed in a folder of the application's directory structure. For more information, see Assembly Searching Sequence.
It is possible to change side-by-side assembly dependencies after an application has been deployed by modifying the Publisher Configuration Files and Application Configuration Files. A publisher configuration file, also called a publisher policy file, is an XML file that globally redirects applications and assemblies from using one version of a side-by-side assembly to another version of the same assembly. A good example when changing dependency may be used is when a bug fix or security fix is deployed for a particular side-by-side assembly and a publisher of this assembly would like to redirect all applications to use the new version of the assembly. An application configuration file is an XML file that redirects a specific application from using one version of a side-by-side assembly to another version of the same assembly. It may be used to redirect a particular application to use a version of a side-by-side assembly different than the one defined in the global publisher configuration file. For more information, see Configuration.
Visual C++ libraries
In Visual C++ 2005, libraries such as ATL, MFC, CRT, Standard C++, OpenMP, and MSDIA are deployed as shared side-by-side assemblies to the native assembly cache. By default, all applications built with Visual C++ 2005 are built with the manifest embedded inside the final binary, which describes the dependencies of this binary on the Visual C++ libraries. To understand manifest generation for Visual C++ applications, see Understanding Manifest Generation for C/C++ Programs