简体   繁体   中英

.Net Installer, Custom Actions Issue

I created a .NET project that contains multiple Installer classes (classes that inherit from System.Configuration.Install.Installer). My goal was, to have one single assembly that contains all possible installers we would need to use in our setup projects, but not necessarily all of them in one single setup project.

The problem that I am experiencing is that when adding a custom action and once I select an assembly, there is no way to select a particular installer that needs to be executed. Since I am not being able to specify the installer I want to run, all installers that are found the assembly are being executed.

Is this how it works by design or am I missing something here?

I think you need to swing your paradigm around. Create only one installer class per assembly/project but have that installer class call the relevant methods to perform your conditional installation

OR

Place each installer class in a separate assembly/project, then create a custom action for the relevant ones and use the CustomAction.Conditional property to tell the installation project which Custom action and installer class to run. See this: http://msdn.microsoft.com/en-us/library/025bcetc(v=vs.80).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM