title: .Net 4.5.1 on Team City
body: <p>I am trying to build a .Net 4.5.1 web project on a team city server. I have installed the windows 8.1 SDK which, which seems to have the assembly <code>Microsoft.Build.Tasks.v4.0.dll</code> in it. However, when I'm trying to build the project I still get the error:</p>
  
  <pre><code>C:\TeamCity\buildAgent\work\bdb0a42dd3d7277\.nuget\NuGet.targets(71, 9): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Build.Tasks.v4.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Build.Tasks.v4.0.dll' or one of its dependencies. The system cannot find the file specified.
  </code></pre>
  
  <p>What do I need to install on the build server or copy from my build environment?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The question is still open, but for now I have solved the issue by editing the project files to use MSBuild 4.0, rather than 12.</p>