问题
My folder structure is:
-- Solution folder
--- .tfignore file
--- folder for each project
But vs2015 keeps including my project.lock.json files in source control.
In my .tfignore file, I added: project.lock.json
I've tried undoing and deleting the files from source control.
How can I stop it from including project.lock.json?
回答1:
Simply update your VS to VS2015Update 3. The .tfignore
should be indeed working correctly.
Or you can also use a temporary quick fix for the problem:
Add an $
char into the bower_components folder name in the .bowerrc. TFS does not allow the $
character in the file name, so it can't be added to source control.
More detail info you can refer this blog from GitHub: Things in ".tfignore" still are shown in pending changes
回答2:
As per the link in Patrick-MSFT's answer, this worked for me:
If the changes are "still" in pending changes, first create a backup copy, then make an Undo on them. Close VS, restore the backup copies and then it should work.
The other solution may work, but Visual Studio kept recreating the file as soon as I deleted it, which would immediately add it back to TFs. So I couldn't check in that change. Possibly closing the solution before making the change in the source control explorer, or using the TFS Power Tools shell extension, may work with the other solution.
来源:https://stackoverflow.com/questions/38855760/vs2015-keeps-adding-project-lock-json-to-tfs