What happened to packet recovery between 2.7 and 2.8?

We use the internal channel for several packages. Today we noticed that Package Restore no longer works. Each package failed with line-by-line error:

Unable to find version of '...' package '...'.

The problem project had its first commitment in 2013-10-04, while NuGet was version 2.7.
Several people successfully cloned a version control repository that didn’t have any binaries at all and nobody remembers any problems with package recovery. So either we all go crazy or it works fine.
When I try to make a new clone today and update it before the first commit, I get the error above. Same thing with the most recent commit. This is with NuGet 2.8

These are the documents regarding package recovery changes in version 2.7 :

Before performing any of the above steps, NuGet verifies that consent is given at two levels:

  • Visual Studio is set to "Allow NuGet to Download Missing Packages"
  • Visual Studio is set to "Automatically check for missing packages during build in Visual Studio"

Both elements are checked in VS parameters.

This approach to package recovery offers several advantages:

  • No need to include it for your project or solution. Visual Studio will automatically download the missing packages before your projects are up and team members don’t need to understand the restoration of the NuGet package.

But that’s how we managed to solve the problem today: right-click on the solution and enable package recovery. This has led to changes at several levels.

.csproj level

+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>

.sln level

+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6FE1C500-523A-4E05-B72E-28F14DEDB055}"
+   ProjectSection(SolutionItems) = preProject
+       .nuget\NuGet.Config = .nuget\NuGet.Config
+       .nuget\NuGet.exe = .nuget\NuGet.exe
+       .nuget\NuGet.targets = .nuget\NuGet.targets
+   EndProjectSection
+EndProject

And finally, the creation .nuget\NuGet.Config, .nuget\nuget.exeand .nuget\NuGet.targets.

As a test, I also created a new solution and project. now my turn

  • add one of the internal packages
  • to build
  • close decision
  • packages, bin obj (, )
  • , .

, . .

2.7.1, 2.7.2 2.8.0, . ?

+3
2

NuGet, ​​ .

.

+2

: https://nuget.codeplex.com/workitem/4000

nuget.exe , , NuGet 302 , , . Fiddler, , VS .

0

All Articles