How to create MSI installer for ASP.NET Core appli

2020-06-14 02:16发布

问题:

I need insights/suggestions for going in right direction and I guess it won't be an easy task. The requirements are:

  1. Install .Net core 2.0 if not installed already.
  2. Install Windows Hosting bundle for IIS if not installed already.
  3. Install SQL Server Express if not installed already.
  4. Drop the published files and folders of asp.net core 2.0 application in Inetpub/wwwroot and do the necessary settings in IIS like setting up application pool to No Managed Code and port etc. Update the connection string in appsettings.json file accordingly.

Your insights and guidance are highly apprenticed . Thank You

回答1:

First concentrate on creating well working msi installer for ASP.NET application only - point 4 - and perhaps just use self hosting app. This would significantly simplify deployment as one of he prerequisites (.NET Core) does not have to be bootstrapped - you remove point 1 of todo list. I understand that at this point you should be capable to install you ASP.NET app into IIS.

Tutorials and articles which may be useful for this part are:

Creating a WiX installer for ASP.NET Web Applications

Packaging a self-contained .NET Core app for Windows Installer

How To Create Windows Installer MSI - .Net Core Wix - video

The next steps would be to learn how to install prerequisites but I am sure once you will get your ASP.NET installer working all other items from todo list will not require further external advice.

You should be aware that both WiX toolset and msi installation technology have steep but not very long learning curve.