“tf.exe 结账”尽管在后期构建中使用了参数 /lock:none ,但仍锁定文件
在一个客户项目中,我需要将构建的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题是为什么要进行“结帐”而不是“获取”?如果您不打算更改原始文件,则没有理由进行签出。
不过,要具体回答这个问题,发生这种情况的原因是默认情况下,可执行文件设置为不允许合并。这意味着——无论如何——对 DLL 的检出将是独占检出。
要更改此行为,在 Visual Studio 2010 中:
单击“确定”提交更改,然后就可以开始了。
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:
Team
menuTeam Project Collection Settings
, thenSource Control File Types
Executable Files
in the file list, and Edit it to enable File MergingClick on OK to commit your changes, and you should be good to go.