title: The task factory "CodeTaskFactory" could not be loaded... visual studio 2015
body: <p>Ok, I have found several similar issues, but none of them match (or fix) this. </p>
  
  <p>Most of the fixes I have found refer to solutions that are being built in a version of VS that they were not created with, or some such. That does not apply to me, and their fixes do not appear to be possible</p>
  
  <p>THis error started for me immediately after I tried adding GeckoFX from Nuget in a VS2015 solution with a crapload of projects in it. Only the project I tried to add it to is "broken" now. The others build fine. </p>
  
  <p>The exact error is:</p>
  
  <pre><code>The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v14.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v14.0.dll' or one of its dependencies. The system cannot find the file specified.    Admin Application           
  </code></pre>
  
  <p>That file does not exist. Now I understand from reading other peoples issues that this is usually fixed by changing the pattern of the build path inside one of the package files. My problem is I can find no reference at all to a dynamically built path that seems to fit. The closest path I can find</p>
  
  <pre><code>&lt;UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"&gt;
  </code></pre>
  
  <p>That is in the nuget.targets file in the root of the solution, but as you can see the path is not the path that is "missing", and its not a dynamically modified path. So I have no idea where this issue is happening. </p>
  
  <p>Can anyone give me a kick in the right direction? Ive got 3 hours on this already with no progress :/</p>