Visual Studio 2005 (and other) : how to deploy debug dll (msvcp80p.dll & friends, for debugging purposes)

2.8k Views Asked by At

I am trying to run (and debug) my application on a remote computer where Visual Studio 2005 is not installed. My current problem is that I am facing the (in)famous error : "The application failed to start because the application configuration is incorrect".

Here is what I did :

1) Install all the required vcredist on the target computer : (I do need all theses versions since some libraries were compiled some months ago, with a previous runtime...).

After installing those redist, the release version works fine.

2) Install the debug dll following the instructions given on the following MSDN pages: Preparing a Test Machine To Run a Debug Executable and at How to: Deploy using XCopy

As mentioned in "Preparing a Test Machine To Run a Debug Executable":

  • I did run "msiexec /i microsoft_vc80_debugcrt_x86.msm" --> This did not solve the problem.

  • After that, I added "msiexec /i policy_8_0_Microsoft_VC80_DebugMFC_x86.msm" --> No luck either.

  • As a last resort, I did "msiexec /i" for all the msm that are in C:\Program Files\Common Files\Merge Modules\*VC80*.msm --> No luck either

As mentionned is "Deploy using XCopy":

I also copied (in subfolders) all the subfolders of

  • C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\

and

  • C:\Program Files\Microsoft Visual Studio 8\VC\redist\Debug_NonRedist\x86\

to my app dir on the target machine. The problem is still present.

Does anyone know what I might be missing ?

2

There are 2 best solutions below

0
On BEST ANSWER

Let me answer my own question : the easiest way is to add a "Setup and deployment project" to the solution.

  • Right click solution / Add new project : Other Project types / Setup and deployment
  • Right click the new deployment project and select "Add/Project Output" then select your target project --> this will create a msi that will install all required debug dll !

(Once installed by the msi, the debug dlls are deployed once and for all : you will not need to reinstall them using an msi each time you want to test a new build).

1
On

You can use the Dependency Walker tool to find what DLL(s) you missed.