title: Side-by-Side configuration incorrect due to incorrect manifest
body: <p>I initially asked this question on the <a href="http://forums.librocket.com/viewtopic.php?f=2&amp;t=828" rel="noreferrer">libRocket</a> forum, but given that further investigation suggests this is more of a general C++/Visual Studio related problem, I am asking here.</p>
  
  <p>I am running Visual Studio C++ 2010 Express and have downloaded the full Win32 source code to libRocket 1.2.1. I have successfully compiled it in debug mode without errors or warnings and am now trying to get it to run within my application, which is built on top of SFML 1.6.</p>
  
  <p>My application compiles without errors or warnings against the recompiled libRocket. As soon as I try to run it, however, I get an error message saying <code>The application was unable to start correctly (0xc0150002). Click OK to close the application.</code></p>
  
  <p>When I open my executable with Dependency Walker, I am getting the following error:</p>
  
  <p><code>Error: The Side-by-Side configuration information for "ROCKETCORE_D.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect.</code></p>
  
  <p>I find this strange because it also shows both my application and RocketCore_d.dll depending on MSVCP100D.DLL and MSVCR100D.DLL. No mismatch there. So I then performed an <code>sxstrace</code>:</p>
  
  <pre><code>=================
  Begin Activation Context Generation.
  Input Parameter:
      Flags = 0
      ProcessorArchitecture = Wow32
      CultureFallBacks = en-US;en
      ManifestPath = Binaries\Debug\RocketCore_d.dll
      AssemblyDirectory = Binaries\Debug\
      Application Config File = 
  -----------------
  INFO: Parsing Manifest File Binaries\Debug\RocketCore_d.dll.
      INFO: Manifest Definition Identity is (null).
      INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
  INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
      INFO: Resolving reference for ProcessorArchitecture WOW64.
          INFO: Resolving reference for culture Neutral.
              INFO: Applying Binding Policy.
                 INFO: No publisher policy found.
                  INFO: No binding policy redirect found.
              INFO: Begin assembly probing.
                  INFO: Did not find the assembly in WinSxS.
                  INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                  INFO: Did not find manifest for culture Neutral.
              INFO: End assembly probing.
      INFO: Resolving reference for ProcessorArchitecture x86.
          INFO: Resolving reference for culture Neutral.
              INFO: Applying Binding Policy.
                  INFO: No publisher policy found.
                  INFO: No binding policy redirect found.
              INFO: Begin assembly probing.
                  INFO: Did not find the assembly in WinSxS.
                  INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                  INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT.DLL.
                  INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
                  INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
                  INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
                  INFO: Did not find manifest for culture Neutral.
              INFO: End assembly probing.
     ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
  ERROR: Activation Context generation failed.
  End Activation Context Generation.
  </code></pre>
  
  <p>It would appear that my system is missing the Visual Studio 2008 runtime. Is this correct? Version 9.0.21022 of the VS2008 redistributable is in fact present on my system. But even so, considering I recompiled libRocket using VS2010, shouldn't it be referencing the VS2010 runtime?</p>
  
  <p>I believe this error stems from a configuration in the newly compiled libRocket's manifest file:</p>
  
  <pre><code>    &lt;dependentAssembly&gt;
        &lt;assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"&gt;    &lt;/assemblyIdentity&gt;
      &lt;/dependentAssembly&gt;
  </code></pre>
  
  <p>I can see where it is coming from since the application was originally written for VS2008 but how can I get VS2010 to generate the correct manifest? The projects properties indicate it is being automatically generated.</p>
  
  <p>Note that this problem only occurs in debug mode, it runs just fine in release. I would of course highly prefer to be able to run it in debug mode on my developer system.</p>
  
  <p>Any pointers on how to resolve this very much appreciated!</p>
  
  <p>Thanks!</p>