简体   繁体   中英

MSI installer for .Net 5 background service

I have a .Net 5 console application that I am trying to run as a Windows service. I have followed all of the articles online on how to do this and have it completed successfully (ie: using BackgroundService). The question is, I want to have an MSI installer to deploy this and all of the articles I have read about creating a service in .Net 5 instruct me to install the service manually using a command prompt or power shell and issuing the "sc" command.

Back before .Net 5, I could use the built in Visual Studio Installer extension and simply create an MSI that would deploy and install my service. I can't seem to make that work for .Net 5.

Is it still possible to use the built in Installer extension to deploy and install my .Net 5 BackgroundService?

Thanks!

Installing Services : There are many ways to install services, you should use an MSI package and the built-in mechanisms there to install and start the service and stop and update it during upgrades.

Various ways to install services (with links to samples on how to install services using MSI).

Learning WiX : Please see the WiX section here - the links should get you started. Direct link to the main WiX link list .


Links:

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