DLL 引用的本地复制失败,因为 TFS 使所有 DLL 变为只读

发布于 2024-10-06 13:35:21 字数 190 浏览 1 评论 0原文

我刚刚将几个引用的 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 技术交流群。

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

发布评论

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

评论(1

奶气 2024-10-13 13:35:21

上面的评论是准确的——通常没有充分的理由检查二进制文件(至少在开发分支中没有)。可能有正当的理由(例如,当您的二进制文件需要根据生产中的内容进行审核时)。如果不需要它们在那里,请让 TFS 管理员对这些项目执行 TF DESTROY,然后小心不要再次签入它们。

话虽这么说,如果您确实需要继续这样做,则必须做几件事。

首先,当您获取源时,您需要“签出”bin 文件夹。这将使所有二进制文件都可写。

但是,如果您这样做,默认情况下,TFS 将在所有二进制文件上放置独占锁。为了防止这种情况发生,您需要告诉 TFS 使这些文件可合并。您需要是 TFS 中的管理员,或者让管理员执行以下步骤。

在 Visual Studio 2010 中:

  • 连接到 TFS
  • 团队菜单下,选择团队项目集合设置
  • 在此菜单下,选择源代码控制文件类型。这将弹出一个对话框。
  • 在对话框中找到列表中的可执行文件,然后单击编辑
  • 在下一个对话框中,选中启用文件合并和多重签出
  • 单击确定关闭此对话框,然后单击“确定”关闭文件类型对话框。

现在,多个用户可以同时查看可执行文件。

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:

  • Connect to TFS
  • Under the Team menu, select Team Project Collection Settings
  • Under this menu, choose Source Control File Types. This will bring up a dialog.
  • In the dialog find Executable Files on the list and click Edit
  • In the next dialog, check Enable file merging and multiple check out
  • Click OK to close this dialog box, and OK to close the File Types dialog.

Now, more than one user can check out the executables at a time.

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