Reputation: 31
NOTE: I have done exhaustive research on this question, there are many supposed solutions out there, none of which have actually worked for me.
After successfully installing a windows service onto a clients computer, I notice that it doesn't start automatically as it is supposed to. When I try to start it manually, I get the error above. I took a look at the Events Viewer log, and here is the error logged there: "Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly "assemblyname.dll" or one of it's dependencies. The specified module could not be found"
It turns out that my .dll, even though I can see it in the installation folder (I did the side-by-side), the system is not able to connect to it. Someone suggested making sure the application file name and the config file name match, mine already did, and my service is set to run on the Local System Account. NOTE: Everything works fine on the dev box, and the client machine has the requisite 4.5 .NET framework for the service to run.
QUESTION: How can I correct this? How can I make sure the system on the client machine is able to see the .dll file that the service uses?
Any help is appreciated here. Let me know if further clarification is needed.
Thanks
Upvotes: 1
Views: 1488
Reputation: 31
OK guys I finally solved my problem. I ran dependency walker and It gave me a list of dlls that were missing, but it turned out they had nothing to do with the dll I was using. But I decided to install Windows SDK for Win 7 with the redistributables, and this solved the problem i was having. There you have it folks, hope this helps someone else going forward. Cheers!
Upvotes: 1
Reputation: 2913
Possible solution
Try compiling it in x86, could be a 64-bit dll, make sure you have the 32-bit version.
Upvotes: 1