Is it possible to create a Windows Service through

2019-08-13 01:58发布

In my visual studio code project, I have generated an .exe file for the project and I'm trying create make my .exe as Windows Service.

From here and here, if I'm not mistaken, these solutions look like done by using Visual Studio instead of Visual Studio Code. Is it possible to create a Window Service through Visual Studio Code?

1条回答
时光不老,我们不散
2楼-- · 2019-08-13 02:07

You cant,

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, Mac OSX, and Windows.

It has no concept of an Windows Service

If you wish to create a Windows service you will have to use Visual Studio or something that can compile standard .net Windows application


Great comment from Ben Voigt

You're correct that Visual Studio Code doesn't have a concept of a service, but that's because it is an editor not a compiler. The same C# compiler installed as part of the .NET runtime, can build Windows Services. And you can edit the windows service code in VS Code

查看更多
登录 后发表回答