防止在 VSS 中检出第三方 DLL

发布于 2024-07-08 11:30:42 字数 414 浏览 10 评论 0原文

(我知道我正在使用 Visual Source Safe,我别无选择,因为它附带 MSDN 订阅许可证,而且我的公司不想购买第三方源代码控制解决方案......)

我有一个 VS 2005 解决方案3 个 C# 类库项目、2 个 ASP.NET 网站项目和 1 个存储在 Visual Source Safe 数据库中的 ASP.NET Web 服务项目。 一些项目引用了处理常见任务的公共库 DLL。

当新人在其工作站上设置解决方案并首次构建它时,它会检查 ASP.NET 网站和 Web 服务项目的 bin 文件夹中的公共库 DLL。 当当前正在处理该项目的另一位开发人员尝试构建时,他们会收到一条“文件已被其他用户排除地签出”消息。

VS 2005 不会在引起头痛的 DLL 旁边显示复选标记。

有没有办法防止这种情况发生?

(I know I am using Visual Source Safe, I do not have a choice because it comes with the MSDN Subscription license and my company does not want to buy a third party source control solution....)

I have a VS 2005 solution with 3 C# class library projects, 2 ASP.NET web site projects and one ASP.NET web service project that is stored in a Visual Source Safe database. Some of the projects reference a common library DLLs that handle common taskes.

When a new person sets ups the solution on their workstation and build it for the first time, it checks out the common library DLLs in the bin folder of the ASP.NET web site and web service projects. When another developer that is currently working on the project tries to build, they receive a "file excludely checked out by other user" message.

VS 2005 does not display the check mark next to the DLL that is causing the headache.

Is there a way to prevent this from happenning?

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

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

发布评论

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

评论(3

南烟 2024-07-15 11:30:42

为什么要将 bin 文件夹签入 SourceSafe? 在我参与的项目中,第三方 dll 被签入与解决方案文件同一级别的单独文件夹(可能称为ExternalLibraries 或ThirdParty)中。 编译过程将被设置为将 dll 复制到 bin 文件夹中。 这可以通过 .refresh 文件或构建前或构建后步骤来处理。 这样,VisualStudio/SourceSafe 不会将文件视为已更新,也不会尝试将其签出。

如果编译已经将文件拉入,因为它们是依赖项,我建议从 VSS 中删除 bin 文件夹。 这与“从项目中排除文件夹”不同,后者在编译时从 VS05 中隐藏该文件夹(并给出您提到的编译错误。)

如果第三方 dll 不打算更改,另一个选择是使这些文件在 VSS 中为只读。 这样,任何用户都无法检出这些文件。 (要将文件标记为只读,您需要从VSS管理工具更改权限;开发人员的工具没有该功能。)

至于为什么会发生这种情况,我不认为VSS会检查二进制版本号- 它只与修改文件日期有关。 如果新开发人员提取所有代码,则所有文件(包括二进制文件)都将以当前日期作为修改日期。 这可能会导致不必要的结账。

关于您后来的评论 - 我不确定为什么 VS05 不会将这些文件视为在源代码控制下,但 VSS UI 会这样做。 我怀疑它与该文件夹中的 .vss 文件(和类似文件)有关。 在这种情况下,VS05 是不正确的。

Why do you have the bin folder checked into SourceSafe? On projects I've worked on, the third party dlls were checked into a separate folder (maybe called ExternalLibraries or ThirdParty) at the same level as the solution file. The compile process would be set up to copy the dlls into the bin folder. This could be handled with .refresh files, or with a pre- or post-build step. This way, VisualStudio/SourceSafe won't see the files as having been updated, and won't try to check them out.

If the compile is already pulling the files in due to them being dependencies, I'd suggest removing the bin folder from VSS. This is not the same as an "Exclude folder from project" which hides the folder from VS05 when compiling (and gives you the compile error you mentioned.)

If the third party dlls aren't going to change, another option is to make those files read-only in VSS. This way, no users will be able to check out the files. (To mark the files read-only, you will need to change the permissions from the VSS management tool; the developer's tool doesn't have that feature.)

As for why it happens, I don't believe VSS checks the binary version numbers - it is only concerned with modify file date. If a new developer pulls all the code out, all files (including binaries) will have the current date as the modify date. This may be causing the unnecessary checkouts.

Regarding your later comments - I'm not sure why VS05 wouldn't see the files as under source control but the VSS UI does. I suspect it has to do with the .vss files (and similar) that are in that folder. In this case, VS05 is incorrect.

痴梦一场 2024-07-15 11:30:42

不确定这是否是问题所在或最佳解决方案,但如果您更新每个开发人员的计算机,以便他们安装相同的最新版本的常见 DLL,这种情况就不会继续发生。 我认为,如果项目文件引用的版本与开发人员计算机上安装的版本不匹配,VSS 会检查 \bin 文件夹中的 DLL。

Not sure if this is the problem or the best fix, but if you update every developer's machine so that they have the same latest versions of the common DLLs installed, this shouldn't keep happening. I think VSS checks out the DLLs in the \bin folder if the version referenced by the project file doesn't match the version installed on the developer's machine.

假情假意假温柔 2024-07-15 11:30:42

@Pedro:

在VS 2005 IDE界面中,它并不表明\bin文件夹位于VSS中。 当我在 VSS UI 中查看该项目时,它显示该项目已签出给在其工作站上执行最新构建的用户。

如果我使用“从项目中排除文件夹”选项,它将导致编译器抛出“未找到引用”错误。

在我的解决方案结构中,类库项目使用“添加引用”命令创建对第三方 DLL 的引用。 然后,我设置了对 ASP、NET 网站和 Web 服务项目中的类库的项目引用(使用网站项目模板)。 由于类库依赖于第三方 DLL,因此它们被复制到 \bin 文件夹中。

如何通过 VSS UI 将文件设置为只读?

@Pedro:

In the VS 2005 IDE inteface, it does not indicated that the \bin folder is in VSS. When I look at the project in the VSS UI, it shows that is checked out to the user who did the latest build on their workstation.

If I use the "Exclude folder from project" option, it will cause the compiler to throw "reference not found" errors.

In my solution structure, the class library project creates a reference to the third party DLLs using the "Add Reference" command. Then I set a project reference to the class librarys in my ASP,NET web site and web service projects (using the web site project template). Because the class library has a dependency on the third party DLLs, they are copyed in the \bin folder.

How do I set a file to read-only through the VSS UI?

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