Visual Studio 2015 and TFS - All excluded changes

2019-04-09 10:12发布

问题:

I was using TFS fine with Visual Studio 2013. I've switched recently to VS 2015 and have an annoying issue (bug ?).

I have a bunch of excluded pending changes that I do not want to commit but that I want to keep locally (bad dev environment, don't ask). My issue is that everytime I re-open VS 2015, all excluded changes are back into the included changes and I have to manually re-exclude all the stuff I do not want to be committed.

If I open VS 2013, included/excluded changes are still in the perfect state ! Anyone knows what is causing VS 2015 to be such a mess ?

回答1:

I just tested this under Visual Studio2015 Update2 and TFS2015 Update3 with about 300 files in excluded list. Everything works prefect.

It's may related to the your VS. First shelveset your excluded list and try to clear TFS and VS cache. Then just unshelveset the files and adding them back to excluded list again. If it's still not work, try to uninstall and reinstall your VS.



回答2:

I had this problem with Visual Studio 2013. To fix it, all I did was:

  1. Make sure all my intended changes were shelved
  2. Undo all pending changes
  3. Close Visual Studio
  4. Wipe out the TFS cache at C:\Users\Username\AppData\Local\Microsoft\Team Foundation\5.0\Cache (where Username is your Windows login username)
  5. Reopen Visual Studio
  6. Unshelved my previous changes back to my workspace

Voila! No more extraneous files showing up in my Excluded Changes list!