The NEW Way to Create Windows Services

Опубликовано: 04 Октябрь 2021
на канале: Roberts Dev Talk
29,593
569

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 😊


Смотрите видео The NEW Way to Create Windows Services онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Roberts Dev Talk 04 Октябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 29,593 раз и оно понравилось 569 людям.