I’ve got a mixed Visual C++ and C# solution, and whenever I try and run it in debug mode, the program fails because the C++ project is attempting to load msvcp100d.dll and msvcr100d.dll. The same happens if I try and run the unit tests.
This doesn’t happen in Release mode though. Does anyone know if I can remove the dependency on this library in debug mode?
Yes, in your project’s properties, configure it to link to the non-debug version of the C runtime library. You want the
/MDswitch (rather than/MDd, which indicates the debug version). However, note that by doing this, you will lose the debugging features of the CRT.The better solution is to figure out how your development environment got borked. The DLLs should be available whenever Visual Studio is installed.