Friday, April 13, 2007 6:32 PMI have an application that is built in VB.NET, Visual Studio 2005 and am using ClickOnce to publish and deploy my application. There is a part of my application that requires the use of 3rd party DLL's and I therefore have them included in my application. NOTE: They are NOT added as references but are added as files to my Visual Studio Solution or in other words are in the same place as all my forms etc. These files are copied to the installation output directory which should be all it takes to work.
So, now, when I go to install this application on a computer I get mixed results. I have two "development" machines that I install this application on and everything works fine. However, I have tried installing it on two "non-development" machines and when I get to the point where my application needs to reference the stated DLL file I get an unhandled exception message stating.....
Unable to load DLL 'dssce'. The specified module could not be found.
I cant figure out why this is working on two computers but isnt working on the others. I have verified that the DLL files are in fact copied to the ClickOnce installation directories. Why is the application unable to load this particular DLL?
Friday, April 13, 2007 6:58 PMModeratorThe 3rd party DLL probably requires one or more support DLLs, either installed in the GAC or stored in a folder like c:\windows\system32, that are not available on the non-development PC. Either pre-install the 3rd party software or find out what DLLs it needs by using DependencyWalker.
Friday, April 13, 2007 8:36 PM
Thanks so much for your reply. After I read this I was really hopeful this could be the answer. So I used that Dependency walker tool you suggested and it listed all the dependencies of the .DLL in question. So one by one, I searched for those .DLL on the machine that was not loading the .DLL in question (Note: I just searched the uppermost "tree", It would take me all day to do all the sub Dll's). Unfortunatly, I found every one of the on the computer that is having the problems.
So, there really isnt a installation for the 3rd party software. It is just .DLL files. There are a couple of them and again, they are all copied to the directory that the application.exe file is in. Normally, that shoud be it! I have also tried copying these .DLL's to the \Windows and Windows\System32\ directories but that doesnt work either. Do I have to do some DLLImport or something in my code?
Thanks for your help!
Friday, April 13, 2007 8:56 PMModeratorMake sure you use the Profile command in DependencyWalker. A lot of DLLs get loaded at run time rather than statically. You'll get a big list, the best way to do it is to run it on a PC that doesn't have the problem, save the log, run it on the problem PC, save that log and compare.
Friday, April 13, 2007 9:36 PM
Sounds like a great idea. OK, so admitedly, this is a bit over my head but I think I can get there. So quick question. I have loaded the .exe and created a profile. However, in my application, the Unable to Load DLL error only happens when the .dll is first called. In this case, it is when a button.click event is fired. Therefore, dont I need to somehow profile this action? In other words, the initial loading of the application works fine and I dont know that this profile will provide the infomation regarding the error. I see there is a Program Arguments field option. Can this simulate this button click from here?
Friday, April 13, 2007 10:09 PMModeratorIt is probably a good idea to play with DependencyWalker for a while. It is a powerful tool but it takes time to learn the power. You can't simulate a button click with "Program arguments". Just click the button and see what happens in either case; the program is not going to load DLLs while it is idle...