在我的 visual studio 代码项目中,我为该项目生成了一个 .exe
文件,我正在尝试将我的 .exe
创建为 Windows 服务。
来自 here和 here ,如果我没记错的话,这些解决方案看起来像是使用 Visual Studio 而不是 Visual Studio Code 完成的。是否可以通过 Visual Studio Code 创建窗口服务?
最佳答案
你不能,
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.
它没有Windows 服务
的概念如果您希望创建 Windows 服务,您将必须使用 Visual Studio 或可以编译标准 .net Windows 应用程序的软件
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
关于c# - 是否可以通过 Visual Studio Code 创建 Windows 服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48514358/