0

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 screenshot for the error.

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

DerStarkeBaer
  • 669
  • 8
  • 28
Hassan
  • 27
  • 5
  • Does this answer your question? [Windows Service Deployment](https://stackoverflow.com/questions/4743064/windows-service-deployment) – Ignasi93 Jan 31 '20 at 07:33
  • @Ignasi93 No, this answer to install a windows service but my question is about packaging windows service with the class library using setup project in visual studio – Hassan Jan 31 '20 at 13:48

1 Answers1

-2

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...

Windows Service Deployment

miken32
  • 42,008
  • 16
  • 111
  • 154
Jason Geiger
  • 1,912
  • 18
  • 32