I have written a c# application using .net 3.5 that uses a dll I wrote in c. On my development computer i have been able to create an installer, install and run the application without any problems. However, when I run the same installer on another computer that does not have microsoft visual studio 2010 on it, I get a dllnotfoundexception and the application crashes. The program runs fine on all computers that have visual studio 2010 installed (At least that I have tested).
Dependency walker says that two dll's are at fault. ieshims.dll and wer.dll. Both of these dll's are not found on the target computer. This is where it starts getting weird for me. ieshims.dll and wer.dll are also not found on my development computer which runs the application just fine. I have tried running process monitor to see where the fault is but am having trouble discerning what is the actual fault that causes the program to crashes.
On the target computer I have tries reinstalling .net 3.5, installing the visual studio runtime libraries, and updating the system with the latest microsoft updates.
Both computers are windows xp service pack 3.
I am using a trial license of visual studio 2010 while my company purchases a license for me.
This is all the information I can think of that's peritent to the problem. If someone could please help me figure out why my application won't run on a computer that doesn't have visual studio 2010 installed.
Loading
Sam HobbsPosted Dec 7, 2010, 7:37 PM
I don't recommend using Dependency Walker unless you understand how Windows uses DLLs. Dependency Walker is accurate but it is difficult to understand the use of DLLs. Beginners hope that Dependency Walker makes things simple but unfortunately it does not; it is not intended to do that.
Justin BodePosted Dec 12, 2010, 12:07 PM
Justin BodePosted Dec 7, 2010, 5:40 PM
Camera Guy:
Yes I did my dll in the same folder as the executable. I have not tried it with visual studio 2008.
Sam Hobbs:
Yes the programs were built under release mode. I was creating an installer project in visual studio 2010 and deploying the application that way.
Both:
You were right in thinking that ieshims.dll and wer.dll were not the real problem problem. In fact, I was finally able to decipher some of the messages from process monitor and found that the missing dll was msvcr100d.dll was the culprit. This dll is the debug dll for the microsoft visual studio 2010 runtime libraries. I don't know why the application depends on this dll but was able to fix the problem by adding the dll to my install package and putting it in the system32 folder.
I was able to use process monitor, exclude any program that wasn't my application and then look for the first dll from the bottom that had the message NAME NOT FOUND as the result.
I also came to the realization that dependency walker does not always give accurate or even correct results. So I would caution people to use that program with a grain of salt.
Thanks again for your posts!
Sam HobbsPosted Dec 6, 2010, 5:52 PM
Are you sure that all your projects are built as a release build and that they don't use any debug versions of software? That is the first thing to look for.
I don't see anything in your description of the problem that specifies what you are using as an installer. Microsoft's use of DLLs can be confusing, therefore deciding what DLLs to install can be confusing.
Roy SPosted Dec 6, 2010, 4:25 PM
And are you sure it's one of those two dlls that aren't found? Maybe there's another dll that comes with visual studio missing (does the exception message tell you more?).
Does it work when visual studio 2008 is installed?