简体   繁体   中英

How do I distribute a Windows service that depends on a class library?

I have a Visual Studio solution. This solutions contains two projects. The first is a class library with all methods that communicate with sql server db. The second is a windows service project will run every 30 minutes.

How do I distribute this setup in one package?

I have tried:

1-adding the class library as a reference to windows service. 2-create a setup project and adding the windows service in the application folder. 3-adding the windows service and the class library to the application folder.

this is a screenshot截屏 for the error.

I think this error because the class library couldn't reach the SQL db.

You are looking to deploy a windows service that is dependent on a DLL.

"deploy" is the standard for what you're calling "distribute". You understand the underlying concept but just realize that the standard is called "deploy".

There are details to do this here... (Don't down vote. Comment so future people can understand.)

Windows Service Deployment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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