DLL 引用的本地复制失败,因为 TFS 使所有 DLL 变为只读
我刚刚将几个引用的 DLL 从项目的 bin 文件夹中移出,并移至共享项目中的特殊 Libraries 文件夹中。现在我收到几个构建错误,因为 VS 试图将 DLL 从新位置复制到 bin 文件夹。
我可以通过将构建文件夹中的 DLL 设置为可读写(而不是默认的 TFS 只读)来轻松解决此问题,但是当我再次签入整个解决方案时,如何防止问题再次出现?
I've just moved several referenced DLL's out of a project's bin folder and into a special Libraries folder in a shared project. Now I get several build errors because VS is trying to copy the DLL's from the new location to the bin folder.
I can resolve this quite easily by making the DLL's in the build folder read-write, not the default TFS read-only, but how do I prevent the problem recurring as soon as I check the whole solution in again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上面的评论是准确的——通常没有充分的理由检查二进制文件(至少在开发分支中没有)。可能有正当的理由(例如,当您的二进制文件需要根据生产中的内容进行审核时)。如果不需要它们在那里,请让 TFS 管理员对这些项目执行
TF DESTROY
,然后小心不要再次签入它们。话虽这么说,如果您确实需要继续这样做,则必须做几件事。
首先,当您获取源时,您需要“签出”bin 文件夹。这将使所有二进制文件都可写。
但是,如果您这样做,默认情况下,TFS 将在所有二进制文件上放置独占锁。为了防止这种情况发生,您需要告诉 TFS 使这些文件可合并。您需要是 TFS 中的管理员,或者让管理员执行以下步骤。
在 Visual Studio 2010 中:
现在,多个用户可以同时查看可执行文件。
The comment above is accurate-- there's usually not a good reason to check in binaries (at least not in the development branch). There can be valid reasons (such as when your binaries need to be audited against what's in production). If they don't need to be there, have a TFS administrator do a
TF DESTROY
on the items, then be careful not to check them in again.That being said, if you do need to continue to do this, you're going to have to do a couple of things.
First of all, you'll need to "check out" the bin folder when you the source. This will make all of the binaries writable.
However, if you do that, TFS will, by default, place an exclusive lock on all of the binaries. To keep this from happening, you will need to tell TFS to make these files merge-able. You will need to be an administrator in TFS, or have an administrator perform the following steps.
In Visual Studio 2010:
Now, more than one user can check out the executables at a time.