I have add a .dll file as a reference in my winform c# project.
The output is one .exe file and one .dll file.
It works well when I run the .exe file in bin/debug folder .. or any other folder on my own computer.
For running the .exe file in other computers, I simply copy both .exe file and the .dll file in a folder..
I got confused that it works in some computers, but it pops up stop working error in others :
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: programname.exe
Problem Signature 02: 0.0.0.0
Problem Signature 03: 4e20a786
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4d8c1599
Problem Signature 07: f9b
Problem Signature 08: 80
Problem Signature 09: System.IO.FileNotFoundException
OS Version: 6.1.7600.2.0.0.16.7
Locale ID: 1033
After using exception control, I got this error details:
System.IO.FileNotFoundException: Could not load file or assembly 'dllname.dll' or one of its dependencies. The specific modulo could not be found.
What's the problem! both files(.exe and .dll) are in the same folder ! It works on some PCs !
Note that required .Net Framework is installed on all computers. with the same versions.
Note that I use x86 build architecture and the problem is the same on both x86 and x64 systems.
Note that one time I've installed MS Visual Studio 2012 and after that the error message disappeared and the program worked correctly after that !! I don't know what could be the relation between installing VS 2012 and the problem !
Note that the program also works well in PCs with no VS installed !
Thanks any help in advance.