title: Team city build with NuGet packages
body: <p>I have set up a build in team city, with a NuGet package reference in the test project.</p>
  
  <p>The folder structre I have used is </p>
  
  <pre><code>\
  |- Project1
    \- Project1.csproj
  |-  Project1.Test
   \- Project1.Test.csproj
  |- packages
   \- lib
    \- RhinoMocks
  </code></pre>
  
  <p>The Project1 project builds sucessfully, but the Test project fails on the ResolveAssemblyReferences step. The relative path seems to be incorrect.</p>
  
  <pre><code>[13:16:55]: [ResolveAssemblyReference] C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
  [13:16:55]: [ResolveAssemblyReference]         For SearchPath "{HintPathFromItem}".
  [13:16:55]: [ResolveAssemblyReference]         Considered "..\packages\RhinoMocks.3.6\lib\Rhino.Mocks.dll", but it didn't exist.
  </code></pre>
  
  <p>TeamCity build config:</p>
  
  <ul>
  <li>MSBuild task</li>
  <li>Build file path: Project1.Test\Project.Test.csproj   <br></li>
  <li>Working directory: %system.teamcity.build.checkoutDir%\Project1.Test</li>
  <li>VCS root points to the root of the folder structure above.</li>
  </ul>
  
  <p>As far I can tell this may be a MSBuild issue, I get the same error when I run MSBuild at the command line in the checkout folder on the build agent.</p>
  
  <p><strong>More info:</strong>
  The hint path is being provided by the Nuget package configuration. Within Visual Studio the package reference works correctly. However, when running via MSBuild, it seems confused about its current directory. The ..\packages... path is actually the verbatim reference path from Nuget.</p>