Hoppe
Hoppe

Reputation: 6805

vs2015 keeps adding project.lock.json to tfs

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?

Upvotes: 2

Views: 1075

Answers (2)

Hoppe
Hoppe

Reputation: 6805

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.

Upvotes: 1

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51083

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

Upvotes: 1

Related Questions