I recently switched my Visual Studio solution from using NuGet MSBuild based Restore to NuGet Automatic Package Restore as outlined in this article: https://docs.nuget.org/consume/package-restore
Unfortunately, every time I add a new NuGet package to any one of my projects, my TeamCity build inevitably fails!
As many times as I build it on my local machine, it always restores the packages successfully and builds fine. It just continues to fail on the TeamCity Build server.
The only remedy I have found for this has been to open the Solution on the TeamCity Build Server and build it at least once on the Build Server itself.
Once I do that, it seems to resolve my NuGet Package issues.
However, I would like to avoid doing that everytime I need to add or update a NuGet Package to one or more of my projects in the solution.
Is there a better way to do this? Do I still have to use the NuGet TeamCity Build Runner even with the NuGet Automatic Package Restore feature built into later release of NuGet with Visual Studio?