Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi experts,

this solution I have consists of three projects: Main program, setup, setup helper.

Setup helper contains methods like OnBeforeInstall, OnAfterRollback, and so on.

For one of these to execute properly, I need to know my main program assembly's name. A somehow similar thing is for the helper to know the installation target directory. It's passed to helper via the CustomActionData property of a user defined action in setup. Example:
/TargetDirectory="[TARGETDIR]\"
How can I get the main application's assembly name in there?
Posted
Comments
Sergey Alexandrovich Kryukov 5-Aug-13 10:32am    
What, are you trying to create a setup project agnostic to the product being installed? But how the solution of your problem could possibly help? Products typically has more than one assembly. And you did not tell us what kind of setup project you are using.
—SA
lukeer 5-Aug-13 12:41pm    
I wasn't aware that there's more than one type of setup projects (Not one-click stuff, a project that creates an Setup.msi and Setup.exe that a user can run to install the application).

I would like to have this because Customer wants the name of the executable changed. That depends on the main application's assembly name. So changing assembly name changes executable name and breaks setup helper's functionality.
Sergey Alexandrovich Kryukov 5-Aug-13 12:47pm    
Sorry, I have no idea how to work with this type of project, but I really dislike it. It's deprecated by Microsoft by VS 2010. I switched to WiX, will advice you to think about it, too...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900