title: Compiling C++ code using Windows SDK 7.1 without .NET Framework 4.0
body: <p>I want to compile C++ project using Windows SDK 7.1 for x86_32.
  I'm using clean Windows XP SP3 x86_32 with latest updates.
  Project (name doesn't matter) is a crossplatform one, is built using Makefiles (no vcxproj/msbuild) and contains only unmanaged C++ code (no C# or other managed code).</p>
  
  <p>I've installed Windows SDK 7.1 (it requires .NET Framework 2.0 to run installer and .NET Framework 4.0 to install C++ compiler), set compile environment using SetEnv.cmd script from SDK and built project successfully.</p>
  
  <p>Now I need to test build on different Windows versions (2003, Vista, 7, 2008) using the same Windows SDK. I don't want to install Windows SDK from ISO every time I need to test build on clean OS - it takes a lot of time. Instead, I want to have a folder with C++ compiler, that I can copy to clean Windows instance, copy code sources next to it and run batch script to start build.</p>
  
  <p>So I copied all Windows SDK files to another folder uninstalled Windows SDK, C++ Compilers and .NET Framework 2.0. Than copied Windows SDK files back to original folders (I can move them anywhere changing SetEnv.cmd script accordingly). After that build works fine. </p>
  
  <p>But when I uninstalled .NET Framework 4.0, build fails on <code>link.exe</code> call:</p>
  
  <pre><code>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
  </code></pre>
  
  <p>I thought, that <code>link.exe</code> use some libraries or tools from .NET Framework 4.0 installation, so I copied <code>C:\WINDOWS\Microsoft.NET</code> folder before uninstallation and then copy it back to original place. That doesn't help.</p>
  
  <p>I googled <code>LNK1123</code> and only advices were: "install VS2010SP1" (that I don't use at all) and "reinstall .NET Framework 4.0" (that works, but this is exactly the thing I'm trying to avoid).</p>
  
  <p>Different compilers is not an option: on Windows this project supports only compiler from VS2010 (that is included in Windows SDK 7.1).</p>
  
  <p>I'm in confusion - does <code>link.exe</code> for x86_32 from Windows SDK 7.1 really <strong>requires</strong> .NET Framework 4.0 <strong>runtime</strong> (not some libraries or native tools) to build completely <strong>native and unmanaged</strong> C++ code (that is not going to be used with CLR in any way)?</p>