Page 1 of 1

SideBySide error with Visual C++ 8.0 Runtime under Vista

Posted: Fri Jan 16, 2009 5:11 pm
by jsmith
One of the runtime prerequisites of my setup is the "Microsoft Visual C++ Runtime 8.0 (includes ATL and MFC)" package.

After Apply Install, I run a native C++ DLL function to perform some custom actions. This works fine... except under Vista. On Vista, I get a SideBySide error from my C++ custom action DLL, claiming that it can't find the VCRT:

Code: Select all

Activation context generation failed for "C:\\Program Files\\MyProduct\\MyCustomActions.dll". Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762" could not be found. Please use sxstrace.exe for detailed diagnosis.


Does anybody have any ideas why this doesn't work under Vista? The VCRT 8.0 runtime installed successfully as a prerequisite before beginning installation of my product. If I search the HDD, I can find the msvcr80*.dll files. They're there. Why can't the system find them to use with my native C++ DLL under vista when they're been successfully installed?

Posted: Fri Jan 16, 2009 5:23 pm
by MichaelNesmith
Does the same error occur when you install the runtime using the native Microsoft installer for the runtime? If so, the problem would appear to be in your application.

Posted: Tue Jan 20, 2009 10:04 am
by jsmith
Thanks for the reply, Michael. That was a good suggestion of something to try. If I install vcredist_x86.exe (the official VCRT 8.0 from Microsoft) manually before launching my setup, then my setup completes without error and my custom actions work flawlessly. The custom actions only fail with the error I listed in the first message of this thread if I allow my setup to install "Microsoft Visual C++ Runtime 8.0 (includes ATL and MFC)" as a prerequisite.

I just noticed while typing that last sentence that the problem was with my IA project - I need VCRT 8.0 SP1 and I was including VCRT 8.0 without SP1. Changing it to SP1 allows it to work under Vista. It's strange that it worked under XP with the wrong VCRT.