简体   繁体   English

Windows服务未通过安装项目安装

[英]Windows Service is not installing via Setup project

I have a windows service and a setup project to go along with it. 我有一个Windows服务和一个安装项目。 When I run the setup project install command it gets part way through the install and then gives me an 1001 error saying it could not find the testservice.exe.config file. 当我运行安装程序项目install命令时,它会进入安装过程的一部分,然后出现1001错误,提示它找不到testservice.exe.config文件。

I looked in my source project and that file is never generated... I have the .exe one but none of them are .exe.config files. 我查看了我的源项目,但从未生成该文件……我有一个.exe文件,但都不是.exe.config文件。 How can I generate this file? 如何生成此文件?

You certainly have App.config file. 您当然有App.config文件。 If you compile your service, there should be testservice.exe.config generated in Bin folder. 如果编译服务,则Bin文件夹中应生成testservice.exe.config。 Read When is an app.config created, when an app.exe.config and what is the difference for further clarification. 读取时间是创建一个app.config的时间,何时创建一个app.exe.config以及有什么区别以进一步说明。

Sounds like you need to change your users.config file to App.config. 听起来您需要将users.config文件更改为App.config。 After that Visual Studio should do the rest. 之后,Visual Studio应该执行其余的操作。

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

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