title: Azure Devops Services Pipeline build fails. Builds successfully through Visual Studio and the msbuild command prompt
body: <p>I have solution with 2 projects both targeting .Net Framework 4. The solution builds successfully in Visual Studio 2015 and 2017 as well as the msbuild command line.  </p>
  
  <p>However, when it builds in Azure DevOps Pipeline with Agent Specification vs2015-win2012r2 the first project fails with the following errors. The NuGet restore step shows it successfully installed the NuGet EntityFramework 5.0 package.</p>
  
  <pre><code>The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)
  The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
  The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p>When I change the Agent Specification to vs2017-win2016 the first project builds without error but the second project fails with the following errors:</p>
  
  <pre><code>The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?)
  The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
  Error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
  </code></pre>
  
  <p>I do have the NuGet package Microsoft.Asp.Net.WebApi.Core.4.0.20710.0 referenced in the csproj file which contains the System.Web.Http.dll.</p>
  
  <hr>
  
  <p>I have turned the debug option on. Here are links to the NuGet Restore Log <a href="https://drive.google.com/open?id=1lJWflXTjYTN_MQyLOnwMUr-8LKoR5JRo" rel="nofollow noreferrer">https://drive.google.com/open?id=1lJWflXTjYTN_MQyLOnwMUr-8LKoR5JRo</a></p>
  
  <p>and the Build Log
  <a href="https://drive.google.com/open?id=1ypAVWxniDLfBOBHc4gODdAoQOCQnphYg" rel="nofollow noreferrer">https://drive.google.com/open?id=1ypAVWxniDLfBOBHc4gODdAoQOCQnphYg</a></p>