views:

8769

answers:

5

Hello,

We moved our Visual C++ 2003 solution to Visual 2005 and now we have problems deploying to clean XP machines.

Our solution has a DLL project and a command line executable which uses this DLL. Both projects create and embed manifest files.

Our installer also copies the VC8 CRT runtimes from the C:\Programme\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\ to the install dir.

When we install on a clean Windows XP, we see the error message "Application has failed to start ... application configuration is incorrect."

Putting the exe in Depends.exe, says:

Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\BENCHMARK.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\MYLIB-VC8.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Event viewer logs:

Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.

Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.

Generate Activation Context failed for C:\Program Files\MySoftware\vc8\Benchmark.exe. Reference error message: The operation completed successfully.

I've read copying the msvcp80.dll,msvcr80.dll,msvcm80.dll and Microsoft.VC80.CRT.manifest to application folder is sufficient.

What am I doing wrong ?

+2  A: 

Select Visual Studio 2005 Merge modules in the installer. This can also occur if you have built the exe/dll using visual studio which has service pack installed.

Vinay
I guess this is not an option as we use Innosetup for our installer.
Paul Baumer
+3  A: 

Copying the CRT dlls around is not recommended. As Vinay says you should use the correct merge modules.

You can also use the redist install exe's if merge modules don't work with your installer technology:

As a last resort try copying the entire 'Microsoft.VC80.CRT' directory to your programs exe directory (not the contents, the actual directory).

Rob Walker
+2  A: 

I had this problem as well. I was appalled at Microsoft for doing this to us.
(I used VC6 to build a particular project and then when I also installed 2003 and 2005 on the build machine it caused my VC6 build to have issues. (I was not checking installs on a pristine machine) Apparently the linker/compiler had no idea what it was doing so it caused problems with my distributable. I then had to add a HUGE redist install file to my 120k exe app. Freakin' microsoft.

MS has screwed this up a few times in the past.

http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

Tim
+2  A: 

You don't really need the Microsoft's VC80 C Run-Time Library. It's a mass.

Instead, relink your program with /MT option, which static links the c run-time library(libcmt.lib) or C++ Standard Library. See the link options from http://msdn.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx

gengmao
A: 

/MT switch does not work... (Tried /MD as well, both documented on MS website...)

LINK : warning LNK4044: unrecognized option '/MT'; ignored LINK : warning LNK4044: unrecognized option '/MD'; ignored

A truly messy problem that MS really has not addressed and not anyone else for that matter...

Sid King