Hi there!
Using multiple instances of Install or any other custom action is perfectly legitimate. You can use it if you wish.
This approach may have one undesirable effect on slow machines though. Every time you do registration this way, Cassini Metabase (configuration file) is being updated. When the file gets updated, Cassini service reloads all applications. This may lead to two "reloads" in the row, and on some machines that sometimes leads to failure to re-bind recently freed TCP port - so there is a reason to do it in one step instead of two.
If you prefer to registers/unregister multiple applications in one take, the way to do it is to create your own installer class (you may need to create an assembly for that) that will act as a custom actions implementation. Your installer class would too use UltiDevCassiniServerConfiguration.dll functionality, but instead of invoking it as a custom installer, you would call it directly, as an
API. You would need to add UltiDevCassiniServerConfiguration.dll as a Reference to your project. When implementing Install step, you would create two instaces of
ApplicationEntry class, set their properties, like application ID, URL, etc. After that you would use
RegisterApplication() method like this:
Code:Metabase cassiniMetabase = Metabase.Load();
cassiniMetabase.RegisterApplication(appEntry1);
cassiniMetabase.RegisterApplication(appEntry2);
cassiniMetabase.Save();
This will accomplish registering multiple application followed by a single applications re-load.
Your Rollback and Uninstall steps would look very similar to that, with the exception that they will use
UnregisterApplication() method:
Code:Metabase cassiniMetabase = Metabase.Load();
cassiniMetabase.UnregisterApplication(appId1);
cassiniMetabase.UnregisterApplication(appId2);
cassiniMetabase.Save();
Then you would use the assembly with your own installer class as a custom actions target.
Please let us know if you have any questions.
Best regards,
UltiDev Team.
Please donate at
http://www.ultidev.com/products/Donate.aspx to help us improve our products.