Search code examples
visual-studiotfstfvc

Can't save a shelf set because of something missing


I was trying to save a shelf set this afternoon on a project I created today. I got an error message that reads:

Team Foundation Error

D:\Src\MiniCoreWebAPI\packages\Microsoft.IdentityModel.Protocols.5.2.1\lib\net451\Microsoft.IdentityModel.Protocols.dll: Could not find a part of the path

I've looked and sure enough, there's no D:\Src\MiniCoreWebAPI\packages\Microsoft.IdentityModel.Protocols.5.2.1 nor anything that would be under it. But I'm not sure what to do about it. This was created by the VS 2017 scaffolding. So, how do I get to save the shelf set, if this is preventing me from doing so.


Solution

  • Remove the file from your pending changes.

    Better yet, create a standard .tfignore file that excludes the packages folder, as NuGet packages should not be put into source control.