3

I've got an executable who's manifest says it depends on

Microsoft.VC90.CRT 9.0.21022.8
Microsoft.VC90.CRT 9.0.30729.1

On Windows 7, this executable runs with no problem. On Windows Server 2008 R2, this executable fails to run with the message:

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

This was unexpected - I thought Windows 7 and Windows Server 2008 R2 should be very similar regarding runtime availability. Both machines are pretty clean. The Windows 7 machine is a fresh installation with nothing on it. The Windows Server 2008 R2 machine only has some updates from Windows Update.

I checked the Windows 7 machine's WinSxS directory and found

Microsoft VC90.CRT 9.0.30729.4926

I checked the Windows Server 2008 R2 machine's WinSxS directory and found

Microsoft VC90.CRT 9.0.30729.4926

The runtime that is present is newer than what is specified in the manifest and yet the Windows Server 2008 R2 system fails to redirect to the newer runtime. Running sxstrace on Windows Server 2008 R2 shows:

INFO: Applying Binding Policy
    INFO: No publisher policy found.
    INFO: No binding policy redirect found.

Running sxstrace on Windows 7 gives:

INFO: Applying Binding Policy
    INFO: Find publisher policy at C:\Windows\WinSxS\manifest\amd64...
    INFO: Publisher Policy redirected assembly version.
    INFO: Post policy assembly identity is...

Any ideas how this could be resolved besides installing the VS 2008 runtime and the VS 2008 SP1 runtime? I thought the whole idea of the assemblies was that it allowed the system to override the older runtimes and substitute the newer ones.

starblue
  • 55,348
  • 14
  • 97
  • 151
likso
  • 3,370
  • 3
  • 17
  • 18
  • I'm experiencing this too. I've compared the SXS directories between a Win7 and Server 2008 R2 machine and they seem the same. Furthermore the error seems isolated to just server 2008 R2 - I tested on Windows Vista, Server 2008 (non R2), Windows 8 (and 8.1), Server 2012 (and R2), and these all have the 30729 version of the C++ runtime, and all redirect appropriately. Only server 2008 R2 has this issue :-( – Orion Edwards Apr 21 '14 at 21:41

2 Answers2

0

You can put the VC++ runtime dlls in your application's executable directory and it should work. You'll need the 2 dll's (MSVCR and MSVCP) and the manifest as well. Off the top of my head just putting all 3 of those files in the application's executable directory should do the trick

Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
  • Make sure to update version inside manifest to match the version your executable links against or it won't find it either. – Eugene Apr 22 '14 at 15:40
0

Although in principle WinSxS allows compatible newer versions of assemblies to replace older versions, the VS runtimes do not make use of this functionality, and bind only to the same version they were compiled against. Either recompile all components of your application against the same version of the library (probably best, to avoid problems with multiple malloc heaps) or install both runtimes.

bdonlan
  • 224,562
  • 31
  • 268
  • 324
  • 1
    that does not seem to be the case - the exe is linked against 9.0.21022.8 and 9.0.30729.1 but runs on a clean Windows 7 machine that only has 9.0.30729.4926 in the WinSxS directory. – likso May 24 '11 at 20:58
  • SxS assemblies have publisher policies that redirect older versions to newer one -- it doesn't happen automatically. Looks like 2008 R2 is missing such a policy for msvc runtime. – Eugene Apr 22 '14 at 15:42