user11081980
user11081980

Reputation: 3289

Visual Studio Online and Automatic Nuget Package Restore are failing

I have a VS2015 solution with a few projects. When I checked in to VSO, I get a bunch of these error messages:

This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ...

Meaning that Nuget is not restoring the packages. Some other posts on SO propose to enable Nuget restore at the solution level, which adds 3 files to the solution and updates the projects.

The issue is that Visual Studio 2015 does not provide this feature anymore, because it now favors the Automatic Nuget Package restore feature. Nuget official documentation is not that clear either. Any help will be much appreciated.

Upvotes: 2

Views: 425

Answers (2)

user11081980
user11081980

Reputation: 3289

I solved this issue by deleting the packages folder from my project in VSO. Now, when I check in, it can restore the packages properly and build successfully.

Upvotes: 1

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29958

Make sure "Allow NuGet to download missing packages" and "Automatically check for missing packages during build in Visual Studio" is checked from "Visual Studo\Tools\Options\NuGet Package Manager". And then run following command from "Package Manager Console" to reinstall all NuGet packages:

Update-package -reinstall

Upvotes: 0

Related Questions