janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

.NET Core IIS Hosting

Hi,

My installer installs .NET Framework 4.7.2 as a pre-install and also sets up Windows Server Roles and Features. Now I also need to add .NET Core IIS Hosting. But this package requires that the IIS is already set up before installing. Adding .NET Core IIS Hosting to Pre-Install will not work, instead I need to run this installer package after Roles and Services have been set up. But, when does this happen?

In short, at what point should I run the .NET Core IIS Hosting package from?
.NET Core Hosting
.NET Core Hosting
NET Core Hosting.png (15.12 KiB) Viewed 3355 times
Thanks!

Regards
Jan
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: .NET Core IIS Hosting

Hello Jan,

The action that takes care of configuring (in your case) the IIS takes place right after the "InstallInitialize" standard action (the custom action is called "AI_WinOptFeaturesInstall" and its sequence is 1501). With that being said, by having your .NET Core IIS Hosting 2.1.5 prerequisite as a post install prerequisite should do the job, since post install prerequisites are actually feature-based prerequisites which are launched after your main installation.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: .NET Core IIS Hosting

Hi Catalin,

World class support as always. Thanks! A follow up on this. If I need to restart the IIS (I have a custom action for it) after .NET Core Hosting has been finished installing at what point would I invoke that CA?
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: .NET Core IIS Hosting

Hello Jan,

You are always welcome, Jan. Glad I could help.

When a post-install prerequisite is launched for execution, it is launched asynchronously (the main installation process does not wait for it to end, due to the fact that 2 installation processes can not run at the same time). With that being said, it means that the main installation process ends before the post-install prerequisite is even installed, which makes it hard (actually impossible) to schedule a custom action after the post-install prerequisite was installed.

However, there is a little trick which you can use to achieve what you want. The action that launches the post-install prerequisites is called "AI_LaunchChainer". This action simply launches a little EXE which deploys post-install prerequisites one by one, in the order specified in the "Prerequisites" page. So here is my solution to your problem: you can create a dummy project in which you will have only your custom action. You can build this project and add the resulted MSI as a post-install prerequisite in your main package, scheduled after the installation of your .NET Core Hosting.

Here are few configuration settings to make your dummy prerequisite "nonexistent":

- in the dummy prerequisite project, please go to "Product Details" page and untick the "Register product with Windows Installer" option. This way, the prerequisite will not appear in Control Panel.

- in the main project, please fill all the prerequisite command line fields ("Prerequisites" page --> click on your dummy prerequisite" --> "Setup Files" tab --> "Install Command Lines") with "/qn", so the prerequisite will be run silently.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: .NET Core IIS Hosting

Top of the line! Your suggestion worked very well. Thank you once again!

Regards
Jan
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: .NET Core IIS Hosting

You are always welcome, Jan.

I am glad I could help.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”