Bagikan melalui


Deploying a Runtime Application Using Windows Installer

Microsoft Windows Installer 2.0 can install and manage common language runtime assemblies. Developers of Windows Installer packages can install assemblies to the global assembly cache or to a location that is isolated for a particular application. This improved capability to isolate applications is an important part of the .NET Framework. For complete information on developing packages that use Windows Installer 2.0, see the Windows Installer documentation.

Windows Installer has the following features that support common language runtime assemblies:

  • Installation, repair, or removal of assemblies in the global assembly cache.

  • Installation, repair, or removal of assemblies in private locations designated for particular applications.

  • Rollback of unsuccessful installations, repairs, or removals of assemblies.

  • Install-on-demand of strong-named assemblies in the global assembly cache.

  • Install-on-demand of assemblies in private locations designated for particular applications.

  • Patching of assemblies.

  • Advertisement of shortcuts that point to assemblies.

Authors of Windows Installer packages can use these features by populating the MsiAssembly and MsiAssemblyName tables.

How Windows Installer 2.0 Works with Assemblies

Windows Installer treats an assembly built with the Microsoft .NET Framework as a single Windows Installer component. All the files that constitute an assembly must be contained by a single Windows Installer component that is listed in the component table of the installer.

Windows Installer installs assemblies into the global assembly cache using the .NET Framework. When installing assemblies into the global assembly cache, the Installer does not use the same directory structure and file versioning rules that it uses to install regular Windows Installer components. Assemblies are added and removed from the global assembly cache as a unit; that is, the files that constitute an assembly are always installed or removed together.

Windows Installer uses a two-step transactional process to install products containing assemblies, which enables the installer to roll back unsuccessful installations.

Removing Assemblies from the Global Assembly Cache

Windows Installer determines whether to remove an assembly based on a client list that it keeps independent of the assembly. Windows Installer keeps one pin bit that represents all Windows Installer clients of the assembly. The assembly maintains one pin bit for each client. The Installer pins the assembly for the first Windows Installer client and unpins the assembly when the last Windows Installer client is removed. The file is then deleted from the global assembly cache.

See Also

Tasks

How to: Develop a Simple Windows Forms Control

Concepts

Deploying an Application for COM Access

Deployment Scenarios for .NET Framework Applications

Other Resources

Deploying .NET Framework Applications