title: NuGet: cannot find Assembly
body: <p>I have a project that is built using teamcity. Inside teamcity the packages are downloaded using NuGet</p>
  
  <p>On our local machines in VS everything works fine, but the Buildserver throws:</p>
  
  <blockquote>
    <p>[13:30:31][ResolveAssemblyReference] Primary reference
    "System.Web.Http".</p>
    
    <p>[13:30:31][ResolveAssemblyReference] C:\Program Files
    (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,
    5): warning MSB3245: Could not resolve this reference. Could not
    locate the assembly "System.Web.Http". Check to make sure the assembly
    exists on disk. If this reference is required by your code, you may
    get compilation errors.</p>
    
    <p>[13:30:31][ResolveAssemblyReference]         For SearchPath
    "{HintPathFromItem}".</p>
    
    <p>[13:30:31][ResolveAssemblyReference]         Considered
    "..\packages\Microsoft.AspNet.WebApi.Core.5.0.0\lib\net45\System.Web.Http.dll",
    but it didn't exist.</p>
  </blockquote>
  
  <p>IMHO it should be inside the WebApi.Core which is included inside the packages conf:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;packages&gt;
    &lt;package id="Autofac" version="3.2.0" targetFramework="net45" /&gt;
    &lt;package id="Autofac.Mvc4" version="3.1.0" targetFramework="net45" /&gt;
    &lt;package id="FluentValidation" version="5.0.0.1" targetFramework="net45" /&gt;
    &lt;package id="libphonenumber-csharp" version="4.10.0.62" targetFramework="net45" /&gt;
    &lt;package id="log4net" version="2.0.3" targetFramework="net451" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Client" version="5.1.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Core" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.OData" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Tracing" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.WebHost" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Data.Edm" version="5.6.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Data.OData" version="5.6.0" targetFramework="net45" /&gt;
    &lt;package id="Newtonsoft.Json" version="4.5.11" targetFramework="net451" /&gt;
    &lt;package id="System.Spatial" version="5.6.0" targetFramework="net45" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>There is already a NuGet-Step in TeamCity and it seems to work:</p>
  
  <pre><code>install] NuGet command: E:\buildAgent1\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe E:\buildAgent1\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe install E:\buildAgent1\work\78d708595d531418\Common\My.RestConnector\packages.config -OutputDirectory E:\buildAgent1\work\78d708595d531418\Common\packages
  
  [13:30:15][install] Starting: E:\buildAgent1\temp\agentTmp\custom_script3183978839714032953.cmd
  
  [13:30:15][install] in directory: E:\buildAgent1\work\78d708595d531418\Common\My.RestConnector
  
  [13:30:15][install] JetBrains TeamCity NuGet Runner 8.0.27692.9
  
  [13:30:15][install] Registered additional extensions from paths: E:\buildAgent1\plugins\nuget-agent\bin\plugins-2.5
  
  [13:30:15][install] Starting NuGet.exe 2.8.50506.491 from 
  
      E:\buildAgent1\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
  
      [13:30:16][install] Installing 'FluentValidation 5.0.0.1'.
  
      [13:30:16][install] Installing 'Autofac 3.2.0'.
  
      [13:30:16][install] Installing 'libphonenumber-csharp 4.10.0.62'.
  
      [13:30:16][install] Installing 'Autofac.Mvc4 3.1.0'.
  
      [13:30:16][install] Successfully installed 'Autofac.Mvc4 3.1.0'.
  
      [13:30:16][install] Installing 'Microsoft.AspNet.WebApi 5.0.0'.
  
      [13:30:16][install] Successfully installed 'Microsoft.AspNet.WebApi 5.0.0'.
  
      [13:30:16][install] Successfully installed 'FluentValidation 5.0.0.1'.
  
      [13:30:16][install] Successfully installed 'Autofac 3.2.0'.
  
      [13:30:16][install] Installing 'Microsoft.AspNet.WebApi.Tracing 5.0.0'.
  
      [13:30:16][install] Installing 'Microsoft.AspNet.WebApi.OData 5.0.0'.
  
      [13:30:16][install] Successfully installed 'Microsoft.AspNet.WebApi.Tracing 5.0.0'.
  
      [13:30:16][install] Installing 'Microsoft.AspNet.WebApi.Client 5.1.0'.
  
      [13:30:16][install] Successfully installed 'libphonenumber-csharp 4.10.0.62'.
  
      [13:30:16][install] Successfully installed 'Microsoft.AspNet.WebApi.OData 5.0.0'.
  
      [13:30:16][install] Installing 'Microsoft.AspNet.WebApi.WebHost 5.0.0'.
  
      [13:30:16][install] Successfully installed 'Microsoft.AspNet.WebApi.WebHost 5.0.0'.
  
      [13:30:16][install] Successfully installed 'Microsoft.AspNet.WebApi.Client 5.1.0'.
  
      [13:30:17][install] Installing 'Microsoft.Data.OData 5.6.0'.
  
      [13:30:17][install] Installing 'Newtonsoft.Json 4.5.11'.
  
      [13:30:17][install] Installing 'Microsoft.Data.Edm 5.6.0'.
  
      [13:30:17][install] Installing 'System.Spatial 5.6.0'.
  
      [13:30:17][install] Successfully installed 'Newtonsoft.Json 4.5.11'.
  
      [13:30:17][install] Successfully installed 'System.Spatial 5.6.0'.
  
      [13:30:17][install] Successfully installed 'Microsoft.Data.Edm 5.6.0'.
  
      [13:30:18][install] Successfully installed 'Microsoft.Data.OData 5.6.0'.
  
      [13:30:18][install] All packages listed in packages.config are already installed.
  </code></pre>