NuGet Package updates & Package.config remove issue (TF400024)

前端 未结 9 1484
不知归路
不知归路 2020-12-31 01:48

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

相关标签:
9条回答
  • 2020-12-31 02:21

    I had a similar issue and I did the following:

    1. Delete the file from my pc.
    2. Check in the change.
    0 讨论(0)
  • 2020-12-31 02:26

    What's happening here (likely) is that you had a previous version (or the same version) of the .dll as a reference, and at SOME point (whether you did it or VS did it), it removed the reference. While you're not seeing the reference in the folder, the TFS / GIT checkin process is still waiting to "check in" the fact that you've removed it. So if you haven't checked in this fact, VS thinks it's still there, when in reality it's not. You can verify this in the Team Explorer area where you should be able to see the removed .dll (indicated by a line through it).

    Kinda stupid, but that's how it goes.

    0 讨论(0)
  • 2020-12-31 02:26

    I had this same problem. The issue was that I had previously installed and uninstalled the package. Even though I checked the project into TFS after the installation, the package remained in the packages folder in my TFS solution.

    In order to resolve, I opened the Source Control Explorer window and located the problem folder as identified in the package installation error message: "The change on \packages[folder][package].nupkg cannot be undone because a file already exists at \packages[folder][package].nupkg. The file must be deleted from disk for the undo to succeed."

    I then deleted \packages[folder] and checked in.

    After this, my NuGet package installed without issue.

    0 讨论(0)
  • 2020-12-31 02:27

    Try:

    • Unbind all your projects from source control
    • Install the nuget package
    • Rebind all your projects again
    0 讨论(0)
  • 2020-12-31 02:31

    Clearing your nuget cache before updating the packages could solve the problem.

    0 讨论(0)
  • 2020-12-31 02:32

    A workaround for us was to check out the entire solution and then update your NuGet packages.

    0 讨论(0)
提交回复
热议问题