vs2015 不断将 project.lock.json 添加到 tfs [英] vs2015 keeps adding project.lock.json to tfs

查看:27
本文介绍了vs2015 不断将 project.lock.json 添加到 tfs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的文件夹结构是:

-- 解决方案文件夹

--- .tfignore 文件

--- .tfignore file

--- 每个项目的文件夹

--- folder for each project

但 vs2015 一直在源代码管理中包含我的 project.lock.json 文件.

But vs2015 keeps including my project.lock.json files in source control.

在我的 .tfignore 文件中,我添加了:project.lock.json

In my .tfignore file, I added: project.lock.json

我已尝试从源代码管理中撤消和删除文件.

I've tried undoing and deleting the files from source control.

如何阻止它包含 project.lock.json?

How can I stop it from including project.lock.json?

推荐答案

根据 Patrick 中的链接-MSFT 的回答,这对我有用:

如果更改仍然"处于挂起的更改中,请先创建一个备份副本,然后对它们进行撤消.关闭 VS,恢复备份副本,然后它应该可以工作了.

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.

另一种解决方案可能有效,但是一旦我删除了该文件,Visual Studio 就会不断重新创建该文件,这会立即将其添加回 TF.所以我无法签入该更改.可能在源代码管理资源管理器中进行更改之前关闭解决方案,或使用 TFS Power Tools shell 扩展,可能适用于其他解决方案.

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.

这篇关于vs2015 不断将 project.lock.json 添加到 tfs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆