C # project 2010, standalone executable on another computer

I have a C # project that I created in Visual Studio Express 2010. This program uses a third-party C # class that relies on / calls the C ++ dll. I just copied the file filename.dll to the bin / debug and bin / release folders in the project folder, and the application turned out fine.

I believe that I can copy the executable file for the project to another computer and run it while the filename.dll file is in the same directory as the executable file. However, after trying this on another computer with frames installed, etc., the program will fail with the system .dllnotfoundexception.

Strange, my friend reports that the program runs on his computer with Visual Studio installed, but not with it, but I did not see this.

What could be the reason for this? And how can I get the release executable to work on another machine?

Thanks for any answers! -Chase

+3
source share
3 answers

If your C ++ dll is built by visual studio, it may depend on CRT, here you need to check two things:

  • If it depends on the release or debugging of the CRT. Microsoft does not give you the right to distribute the debug version except debugging tasks, so this can be a problem.
  • Witch version depends on
    • The latest version of vs2010 can be copied in the same directory as the executable file (msvcp100.dll for C ++ msvcr100.dll for C)
    • , ( , VS2005, , , VS2005 SP1, )

Dependency Walker () , , dll .

+1

, Visual ++ ​​(VS2005, VS2008, VS2010).

+4

(, , "" ) - Setup . .

:

  • ( " .../ " )
  • , "/Project output..." .
  • "/ ".
  • node, " ..." " " " [ ]".

Now that you compile, the .msi installer is created. Run this installer on another computer and your program will be installed and running. To remove the program, run the installation program or remove the program from the "Add or Remove Programs" under the control panel.

0
source

Source: https://habr.com/ru/post/1755453/


All Articles