Nuget Package updates & Package.config remove issue

Topics: Ecosystem
Mar 8, 2013 at 7:20 PM
Edited Mar 11, 2013 at 4:04 PM
Hey guys

We are having issues with nuget package updates and TFS source control integration. This is causing allot of hassles with our team and making us hesitate in adopting nuget packages fully.

The issue / bug ; instead of updating certain projects "package.config" files, they are being removed from the file system (and marked as deleted within TFS source control...) I can't work out why...

The behavior we are seeing is the following :
  1. Open in solution (approx. 18 projects) in VS.NET 2012
  2. Initiate a solution level package update to the latest version via the Package Management Dialog, as described (here).
    2.1. The package.config exists and part of the project(s) within said selected solution.
    2.2. Theses packages.configs are NOT checked out of TFS yet.
  3. Nuget package update occurs, select package.config are removed from project and marked as deleted within TFS and references remain in project updated to current version....
    3.1. Obviously, this means that when I check in the solution and project the packages.config will be removed, making future updates (I believe) painful as above project will fall off nuget's radar....
  4. I notice this and Undo Check-Out & get this error :
    TF400024: The change on xxx\packages.config cannot be undone because a file already exists at xxx\packages.config. The file must be deleted from disk for the undo to succeed.
    4.1. Interesting, to TFS the file is marked as deleted yet it still resides on my file system?
The output provided by Package Manager listed below does not indicate any issues for the project in which the pacakage.config was removed...

the VS.NET Package Manager OUTPUT :
Updating 'NugetPackageAssemblyA' from version '1.5.18.0' to '1.5.23.0' in project 'CommonUnitTests'.
Removed reference 'AssemblyAA.dll' from project 'CommonUnitTests'
Removed reference 'AssemblyBB.dll' from project 'CommonUnitTests'
Removed reference 'AssemblyCC.dll' from project 'CommonUnitTests'
Removed reference 'NugetPackageAssemblyA.dll' from project 'CommonUnitTests'
Added file 'packages.config'.
Removed file 'packages.config'
Successfully removed 'NugetPackageAssemblyA 1.5.18.0' from CommonUnitTests.
Added reference 'AssemblyAA' to project 'CommonUnitTests'
Added reference 'AssemblyBB' to project 'CommonUnitTests'
Added reference 'AssemblyCC' to project 'CommonUnitTests'
Added reference 'NugetPackageAssemblyA' to project 'CommonUnitTests'
'packages.config' already exists. Skipping...
Successfully added 'NugetPackageAssemblyA 1.5.23.0' to CommonUnitTests.
DEV. Environment Stats :
  • Nuget Package manager : version 2.2.40116.9051
  • Visual Studio 2012 : version 11.051106.01 Update 1
Is there anything I'm missing ????
Thanks
Mar 22, 2013 at 7:48 PM
reported issue to hopefully address this behavior
see : http://nuget.codeplex.com/workitem/3170