I am moving our source code from Vault to TFS, not bothering with the migration or anything, just pulling a get latest in vault and adding it to TFS.
The solution has got several projects, and each one has at least one NuGet package. I am trying to get Package Restore working again. It worked in Vault (but not the way it was supposed to). I was under a bit of a deadline, and it did not work at first, so I added a Pre-Build event to run nuget.exe against the packages.config for each project.
TFS build service complains about that, so I am trying to get it working "right".
- I have set the option in Visual Studio Tools menu.
- I have installed NuGetEnablePackageRestore and run the fix.
- I have verified that the packages directory is is source control, but is empty.
- I have verified that the project files each include the following:
<RestorePackages>true</RestorePackages> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
Building with Diagnostic level verbosity reveals that each project evaluates those properties, but the RestoreCommand in nuget.targets is never executed.
Any thoughts?
I have attempted to implement the solutions from these links:
- nuget - package restore not working
- NuGet Package Restore Not Working - I did post a question/comment on there asking for clarification...
- http://nuget.codeplex.com/workitem/1879
Edit
Additionally, I have found that the RestoreCommand property is being evaluated during build. Diagnostic Verbosity shows:
RestoreCommand = (set EnableNuGetPackageRestore=true) && "C:\Source\Kiersted Direct And Related\Direct\Kiersted\.nuget\nuget.exe" install "packages.config" -source "@(PackageSource)" -o "C:\Source\Kiersted Direct And Related\Direct\Kiersted\packages"