I developed a winforms application in C# 4.0 that uses a .dll to communicate with a USB device. From Visual Studio 2010 this application works without problem. The referenced .dll is copied to the bin folder.
When I tried to run the application directly on the target machine it didn’t do anything. I’ve added an unhandled exception handler to the application that logs the messages. When run locally on the target machine it doesn’t log anything.
When I put the application on a network folder and run it (over the network) from my development p.c. it still works fine, but from my target p.c. it now logs “Could not load file or assembly ‘sub20dnc.dll’ or one of its dependencies. The specified module could not be found.”
But as I said, the .dll is copied to the bin folder: sub20dnc.dll is in the same directory as the executable. sub20dnc.dll is part of an installation already done on the p.c. so it’s dependencies should have been met. I’m trying to solve this error fist before tackling why nothing at all happens on the target machine locally.
Any ideas of how to solve this?
Thanks!
Sounds like they’re missing a dependency on their machine rather than your .dll not being there. That is, a dependency of the .dll in question that “can’t be found.” That’s the error I always see when something else isn’t of a more later vintage.
Try running Depends.exe on their machine, checking against the .dlls your machine has. Also, may I suggest plugging the software into a test machine that has the most basic target machine configuration that you’re attempting to work. That is, not on the latest and greatest updates.