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



The information in this article applies to:

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition

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:

Modification Type:MajorLast Reviewed:2/17/2006
Keywords:kbtshoot kbnofix kbprb KB906766 kbAudDeveloper