SharedLegacy Property

Specifies whether to mark a selected file, assembly, or project output group as a shared legacy file. When an installed file is marked as a shared legacy file, Windows Installer keeps reference count information about any legacy copy of the file (installed by a prior setup) it finds on the target computer. By maintaining a correct reference count for existing legacy files, the installer can determine whether to delete legacy files when it uninstalls the application.

The SharedLegacy property is important when you install shared files that exist outside of a merge module. For example, you might write or use a component that includes a shared file that already exists on the target computers. In this case, deleting the shared file when your application is uninstalled could break the older application that originally installed the file.

In addition, some third-party vendors distribute their shared files in formats other than merge modules. To include such a shared file in an installer, you can set the SharedLegacy property.

The settings for the SharedLegacy property are:




The selected file is not marked as a shared legacy file. Any reference count information about legacy versions of the file is ignored.


Marks the selected file as a shared legacy file. Reference count information about legacy versions of the file is maintained on the target computer when the application is installed or uninstalled.


When the SharedLegacy property of a project output group is set to True, all files in the project output group referenced counted.

See Also


Properties for the File System Editor


Visual Studio Installer Deployment