Here is how you create and install a Windows Service using the .NET Core Worker template in both Visual Studio 2019 and VS Code (using the DotNet CLI). I'll cover scaffolding the project, hooking into app lifecycle events, adding the Serilog library for logging to file and console, adding the WindowsServices package, installing as a Windows Service, and demonstrate starting and stopping the service.
☕️ Support us with a coffee! (Or.. beer 🍺)
https://www.buymeacoffee.com/Robertsd...
Check out the full Serilog video here:
• Make .NET Logging EASY with Serilog |...
Lots of info on the .NET Worker template here:
• Hello .NET Core Worker Services! | C#...
0:00 Intro
0:25 Creating Worker from Command Line
1:00 Creating Worker with Visual Studio
1:30 Worker and Lifecycle hooks
3:14 Adding Serilog
5:50 Adding Windows Service
6:40 Publish from the Command Line
7:40 Publish from Visual Studio
8:36 Install Windows Service
10:24 Outro
📧 📫 Join us on our developer journey! Sign up to our email newsletter:
https://robertsdevtalk.com
🐦 Follow us on Twitter:
/ robertsdevtalk
🎶 Music by Epidemic Sound:
https://www.epidemicsound.com/referra...
Icons in this video kindly provided by FlatIcon from Freepik
https://www.freepik.com
https://www.flaticon.com
Disclaimer - some of our links are affiliate links, which means that we receive a small commission for any sales made via those links, at no extra cost to you - so a great way to support our channel! Thank you so much for your support 😊
Watch video The NEW Way to Create Windows Services online without registration, duration hours minute second in high quality. This video was added by user Roberts Dev Talk 04 October 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 29,593 once and liked it 569 people.