vs2015 keeps adding project.lock.json to tfs

Deadly 提交于 2020-01-04 06:07:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!