[英]Creating an installer for a windows service on Visual Studio 2022
typically I don't work with VS and C#, but my company requires it for this project.通常我不使用 VS 和 C#,但我的公司在这个项目中需要它。 So kinda new on this stuff.这东西有点新。
I got some code from a previous developer, which is just a .net service doing some stuff.我从以前的开发人员那里得到了一些代码,这只是一个 .net 服务做一些事情。 Som adjustment had been done in the code my me, not a problem at this point.我的代码中已经完成了一些调整,此时不是问题。
But here comes the trick: I need to create an installer, .exe or.msi file, which installs the service on the windows machine where it get's executed.但诀窍来了:我需要创建一个安装程序,.exe 或 .msi 文件,它将服务安装在执行它的 windows 机器上。 I tried so much, googled my ass off but nothing did the work for me.我尝试了很多,用谷歌搜索了我的屁股,但对我没有任何帮助。
Is there anyone that can help and explain, step for step, what I need to do in VS?有没有人可以帮助和解释,一步一步,我需要在 VS 中做什么?
Very much thanks in advance!非常感谢提前!
I highly recommend the WiX Toolset to create an MSI for installing a Windows service.我强烈推荐 WiX 工具集来创建用于安装 Windows 服务的 MSI。 This tutorial takes you through the process from end-to-end, including setting up your development environment for WiX. 本教程将引导您完成整个过程,包括为 WiX 设置开发环境。 You can see their service install documentation for a high-level overview.您可以查看他们的服务安装文档以获得高级概述。 Also, this StackOverflow question is an excellent resource.此外, 这个 StackOverflow 问题是一个很好的资源。
If you run into issues, I'm happy to help address them.如果您遇到问题,我很乐意帮助您解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.