I've just built a windows service and it runs like a dream in debug/release on my dev machine. I've created a setup project following steps in walkthroughs such as this blog post, this msdn walkthrough, and this generous answer to a rather lazy SO question.
My project installs fine on a target machine, but when I run it, the timer ticks but nothing happens. When investigating this I noticed that the installer doesn't seem to have copied over a couple of dlls with it that are referenced in my app. I can see them in my bin folder for the app, and I can see them listed in the dependencies
array from the Primary output from MyProject (Active)
node in my setup project. But they're not in the app's Program Files
folder where the .exe is on the target machine.
Can anyone suggest some steps I can go through to ensure I'm doing this correctly?
Turns out you need to explicitly add referenced files to the setup project (right-click on the setup project, and
Add
>File...
and browse to/select the applicable files).However, I'd still like to know: