3

We have a (mainly) C#/WPF application that invokes some C++ libraries via interop.

For testing purposes (and because of some inconsistencies in a third party library), we would like to distribute a debug version or our application on a target machine, partially for remote debugging.

In any case, when doing so, the program barfs with a dreaded 0x800736B1 error loading a C++ dll. This appears to be (at least until we find the next stumbling block) caused by not having a debug version of the VC++ runtime libraries installed on the target machine.

Is there a version of the VC++ redistributable package with debug libraries, or failing that, is there a "preferred" way of putting those libraries on a test machine?

Thanks, wTs

Wonko the Sane
  • 10,623
  • 8
  • 67
  • 92
  • 2
    Have you looked at this? http://msdn.microsoft.com/en-us/library/aa985618%28VS.80%29.aspx. Also look at http://msdn.microsoft.com/en-us/library/ms235299.aspx – Tim Oct 07 '10 at 13:53
  • Perfect - thanks! I was looking for just such a doc - my Google Fu hath failed me. – Wonko the Sane Oct 07 '10 at 14:29

2 Answers2

3

Here are the official MS instructions.

Preparing a Test Machine To Run a Debug Executable

Use Merge Modules to install a debug version of a particular Visual C++ library as shared side-by-side assemblies into the native assembly cache (WinSxS folder).

How to Deploy a Setup and Deployment Project

syvex
  • 7,518
  • 9
  • 43
  • 47
1

If the target machine is under your control, you may want to install Visual Studio on it. That will deploy the debug version of the runtime.

Alternatively, copy the side-by-side libraries from your development machine to the target machine. Look in %windir%\WinSxS. On my dev machine (VS 2008 SP1), they reside in the following folders:

%windir%\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456
%windir%\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f
%windir%\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_5d84dd2f
%windir%\WinSxS\x86_Microsoft.VC90.DebugMFC_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_2a62a75b
%windir%\WinSxS\x86_Microsoft.VC90.DebugMFC_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_c94a3a24
%windir%\WinSxS\x86_Microsoft.VC90.DebugMFC_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_2e6b5034
%windir%\WinSxS\x86_Microsoft.VC90.DebugOpenMP_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_72b673b0
%windir%\WinSxS\x86_Microsoft.VC90.DebugOpenMP_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_76bf1c89
Frédéric Hamidi
  • 258,201
  • 41
  • 486
  • 479
  • 2
    i wouldn't recommend copy the SxS manually (skipping all the registration stuff). – YeenFei Oct 07 '10 at 14:48
  • Well, I actually did that once without any issues (they're not COM DLLs, why would they need to be registered?). But YMMV :) – Frédéric Hamidi Oct 07 '10 at 14:59
  • I will probably select this as the answer, as this along with @Tim's comment above, allowed me to install the files (as was the original questio). However, I am still getting the same errors, and DependencyWalker still says that the MSVCM90* files cannot be found. It is trying to find it in local directory, though, so it's almost as if these aren't getting registered on installation. – Wonko the Sane Oct 07 '10 at 15:01
  • 1
    Ah, missed a substep. Needed to also include the merge modules for the policy files. Thanks for the help! – Wonko the Sane Oct 07 '10 at 18:24