I\'ve been struggling with getting NuGet to work for well over a week now. I finally got it to work on local builds, but not on TFS 2013 builds. I narrowed it down to NuGet not
To enable restore NuGet package with TFS XAML build, please try to follow below steps:
1. <RestorePackages>true</RestorePackages>
2.<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
3. <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information,
see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
More details please refer this step by step tutorial:Auto restore Nuget packages with TFS Build the right way