The installer does not run the custom action when you try to run a new version of a setup project in Visual Studio 2005

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
Consider the following scenario:
  • In Microsoft Visual Studio 2005, you try to run a new version of a setup project to upgrade an application.
  • The new version of the setup project replaces the earlier version of the setup project.
  • Both the new version of the setup project and the earlier version of the setup project contain a custom action of the Install event.
In this scenario, the installer does not run the custom action of the new version of the setup project. Instead, the installer runs the custom action of the earlier version of the setup project.
Cause
This behavior occurs when you use the LoadFrom method inside the System.Configuration.Install.dll file. When the new version of the setup project tries to run the custom action, the LoadFrom method finds the custom action of the earlier version of the setup project to be a match. Then, the LoadFrom method runs the custom action of the earlier version of the setup project. The LoadFrom method does not run the custom action of the new version of the setup project.
Workaround
To work around this behavior, sign the assembly that contains the new version of the setup project by using a strong name.
Status
This behavior is by design.
More information
For more information about how to sign an assembly by using a strong name, visit the following Microsoft Developer Network (MSDN) Web site:
Properties

Article ID: 906766 - Last Review: 01/16/2015 22:58:00 - Revision: 2.0

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • kbnosurvey kbarchive kbtshoot kbnofix kbprb KB906766
Feedback