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

Article translations Article translations
Article ID: 906766 - View products that this article applies to.
Expand all | Collapse all

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:
http://msdn2.microsoft.com/en-us/library/xc31ft41.aspx

Properties

Article ID: 906766 - Last Review: February 17, 2006 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
Keywords: 
kbtshoot kbnofix kbprb KB906766

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com