For programs compiled in Visual C++ 2005, the CRT DLLs are required to be side-by-side assemblies - so they need to be 'properly' installed, for values of 'properly' that don't include just dumping the DLLs in the same directory as the EXE.

For versions of Windows that support !WinSxS (XP, 2003, etc), these can be installed by a sufficiently capable installer (typically into c:\windows\!WinSxS). But currently we don't want to have any installer, since everything should work straight out of SVN. Those versions of Windows also search some places within the application's directory, when they can't find the DLL already installed inside !WinSxS:

  • <app>\<language-culture>\<assemblyname>.manifest
  • <app>\<language-culture>\<assemblyname>\<assemblyname>.manifest
  • <app>\<assemblyname>.manifest
  • <app>\<assemblyname>\<assemblyname>.manifest
  • etc

For versions of Windows that don't support !WinSxS (2000, etc), it still installs things in the !WinSxS directory but never actually uses them (unless you upgrade to XP, but why would you ever do that?), and only searches in the standard locations - PATH (like c:\winnt\system32, where it typically installs those CRT DLLs) and the application's directory.

Since we want to support both Win 2000 and XP, and without requiring any effort to install anything, the intersection of search paths requires us to put the CRT DLLs and manifest in the application directory. So Win2K will just load the DLLs happily, since they're the right name; while WinXP will load the manifest, look for similar (possibly updated) assemblies installed on the user's system, and fall back on the ones in the application directory if it can't find anything better.

If we ever do want a proper installer, it might be considered nicer to really install the CRT assemblies into the proper places; but I don't know how easy/possible that is with something other than the Windows Installer system, and I rather dislike Windows Installer, so it should be adequate to just use the files like we do now.

Last modified 9 years ago Last modified on Feb 23, 2008 3:18:58 AM