简体   繁体   English

C# windows 服务安装与桌面应用程序

[英]C# windows service install with desktop application

I have a wpf desktop application (ERP) system我有一个 wpf 桌面应用程序 (ERP) 系统

Application is using setup and deployment to create the .exe file应用程序正在使用安装和部署来创建 .exe 文件

Now, i want to create a window service for my application to do some background check ups , synchronizations with my database etc.现在,我想为我的应用程序创建一个窗口服务来进行一些背景检查、与我的数据库同步等。

I know how to create a service in.net and how manually to install it following the examples online.我知道如何在 .net 中创建服务以及如何按照在线示例手动安装它。

My question is how i can install (or include let's say) this service within my .exe setup.我的问题是我如何在我的 .exe 设置中安装(或者说包括)这个服务。

I don't want the user to be responsible to install the service.我不希望用户负责安装服务。

Neither me to login every time someone pc to install the service每次有人电脑安装服务时我都不登录

Not sure if i misunderstood the purpose of service but i found nothing online related to my question.不确定我是否误解了服务的目的,但我在网上找不到与我的问题相关的任何内容。

You can use Microsoft Visual Studio Installer Projects and include your service/main project at the same time您可以使用 Microsoft Visual Studio 安装程序项目并同时包含您的服务/主项目

https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM