c# - 是否可以通过 Visual Studio Code 创建 Windows 服务?

标签 c# visual-studio visual-studio-code

在我的 visual studio 代码项目中,我为该项目生成了一个 .exe 文件,我正在尝试将我的 .exe 创建为 Windows 服务。

来自 herehere ,如果我没记错的话,这些解决方案看起来像是使用 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/

相关文章:

c# - 在 ASP.NET 中如何将 Enum 绑定(bind)到 DropDownList 控件?

visual-studio - FxCop 构建 (Visual Studio 2008 Professional)

python - VsCode远程调试,修改pythonpath指向docker容器的python解释器

tfs - 从 TFVC for Visual Studio Code 中的排除更改中删除文件/目录的方法

c# - SQL Azure 上突然出现大量等待操作超时问题

c# - 如何获取当前的Azure FunctionNameAttribute?

c# - 扩展方法,泛型 List<T> 上的 SumIf

c# - 多重抽象形式继承

c++ - Visual Studio C++ 2015 Update 3 中的 abs(complex) 出现奇怪问题

typescript - Yarn 2 PnP、VSCode 和@types