“tf.exe 结账”尽管在后期构建中使用了参数 /lock:none ,但仍锁定文件

发布于 2024-09-11 12:16:39 字数 254 浏览 3 评论 0原文

在一个客户项目中,我需要将构建的 dll 复制到另一个位置,在那里它将被签入并在不同的解决方案之间共享。

我正在使用构建后步骤来签出指定 /lock:none 参数的目标文件,以便其他人也能够创建本地发布版本,然后将我的新 dll 文件复制到旧文件上。

但是,当我在控制台提示符上使用 tf.exe checkout /lock:none 时,一切都会按预期进行。当在构建后脚本中使用时,文件会被锁定,没有人可以再查看它。

我该如何解决这个问题?

In a customer project, I need to copy a built dll to another place where it will be checked in and shared amongst different solutions.

I am using a post build step to checkout the target file specifying the /lock:none parameter so that others will be able to create local release builds as well and then copy my new dll file over the old one.

However, when I use tf.exe checkout /lock:none on a console prompt, everything works as expected. When used within a post build script, the file gets locked and nobody can check it out anymore.

How can I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌逼全场 2024-09-18 12:16:39

第一个问题是为什么要进行“结帐”而不是“获取”?如果您不打算更改原始文件,则没有理由进行签出。

不过,要具体回答这个问题,发生这种情况的原因是默认情况下,可执行文件设置为不允许合并。这意味着——无论如何——对 DLL 的检出将是独占检出。

要更改此行为,在 Visual Studio 2010 中:

  1. 转到“团队”菜单
  2. 选择“团队项目集合设置”,然后
  3. 选择“源代码管理文件类型”
  4. 查找 <文件列表中的 code>Executable Files,然后编辑它以启用文件合并

单击“确定”提交更改,然后就可以开始了。

First question is why do a "checkout" instead of just a "get"? If you're not going to be changing the original file, there's no reason to do a checkout.

To answer the question specifically, though, the reason this is happening is that by default, executable files are set to not allow merging. That means that-- no matter what-- a checkout on a DLL is going to be an exclusive checkout.

To change this behavior, in Visual Studio 2010:

  1. Go to the Team menu
  2. Select Team Project Collection Settings, then
  3. select Source Control File Types
  4. Find Executable Files in the file list, and Edit it to enable File Merging

Click on OK to commit your changes, and you should be good to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文