how to make visual studio 2019 .NET 5.0 windows service program

jinsun 0 Reputation points

I want to create a program written in C# .NET 5.0 as a Windows service program.

I am currently using Visual Studio 2019, but I do not see a Windows Service template for .NET, only for .NET Framework. Has the template been discontinued? Does this mean there is no way to create a Windows service project with .NET 5.0 or .NET Core?

I have tried various methods but have been unsuccessful. Can you provide a solution?

thank you,

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,401 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 58,121 Reputation points

    First, .net 5 is out of support and should not be used for new projects. Second it’s just a nuget package you add, rather than project type.

    0 comments No comments