title: Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located
body: <p>I'm building/packing a web application in a build server, and it fails with the following message:</p>
  
  <blockquote>
    <p>ASPNETCOMPILER error ASPCONFIG: The CodeDom provider type
    "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be
    located.</p>
  </blockquote>
  
  <p>This is the build server environment:</p>
  
  <ul>
  <li>Windows Server 2008 R2 Standard</li>
  <li>TeamCity 8.0.4</li>
  <li>.NET 4.5</li>
  <li>Windows SDK for Windows 7 and .NET 4</li>
  <li>Windows SDK for Windows 8 and .NET 4.5</li>
  <li>Portable Class Library Tools</li>
  <li>ASP MVC 4</li>
  </ul>
  
  <p>It is a ASP MVC 4 web application, targeting .NET 4.5.</p>
  
  <p>The build configuration consists in building the solution with MSBuild, and deploying it to a package, so I can publish it later.</p>
  
  <p>Through the log of TeamCity, I can see the error arising when MSBuild runs <code>aspnet_compiler.exe</code>.</p>
  
  <p>The builds with no problem in my DEV machine and can also publish it to a local IIS without problems.</p>
  
  <p>Does anyone know what may be causing this issue?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p><a href="https://stackoverflow.com/a/20963170/702828">See my answer below.</a></p>