Visual Source Safe - 从 Web 项目中删除文件

发布于 2024-07-11 19:12:50 字数 457 浏览 8 评论 0原文

我会尽力让这件事尽可能简单。

  1. 目前我们的团队有一个 VSS 数据库来存储我们的项目。
  2. 开发人员获取代码并将其放置在本地主机上并在本地进行开发。
  3. 指定开发人员获取最新版本并推送到开发服务器。

问题是,当一个文件从项目中删除(通过在 VS2008 中删除它)时,下次另一位开发人员(不是删除它的人)签入时,它会提示他们签入那些已删除的文件,因为他们仍然有复制到他们的本地机器上。

有没有解决的办法? 让 VSS 指示客户端计算机删除这些文件而不提示它们重新签入? 对此的首选方法是什么?


编辑注释:

  1. 我同意 SVN 比 VSS 更好
  2. 我同意 Web 应用程序项目比网站项目更好
  3. 问题:从类库中删除的文件也会发生同样的情况。

I'll try to make this as straight forward as possible.

  1. Currently our team has a VSS database where our projects are stored.
  2. Developers grab the code and place on their localhost machine and develop locally.
  3. Designated developer grabs latest version and pushes to development server.

The problem is, when a file is removed from the project (by deleting it in VS2008) then the next time another developer (not the one who deleted it) checks in, it prompts them to check in those deleted files because they still have a copy on their local machine.

Is there a way around this? To have VSS instruct the client machine to remove these files and not prompt them to check back in? What is the preferred approach for this?


Edit Note(s):

  1. I agree SVN is better than VSS
  2. I agree Web Application project is better than Web Site project
  3. Problem: This same thing happens with files which are removed from class libraries.

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

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

发布评论

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

评论(5

旧伤慢歌 2024-07-18 19:12:50

解决这个问题的第一个方法是停止使用网站项目。 网站项目使 Visual Studio 自动将其在项目路径中找到的任何内容添加到项目中。

相反,请移至不存在此行为问题的 Web 应用程序项目。

网站项目适合单人开发。

更新:

过去的 VB 商店也有类似的问题,因为他们安装的任何内容都会影响构建过程。 您可能会借鉴他们的剧本并拥有一台“干净”的构建机器。 在进行部署之前,您将删除所有项目文件夹,然后执行获取最新操作。 这样您就可以确保部署的唯一内容就是源代码管理中的内容。

顺便说一句,这也是 TFS 构建服务器的工作方式。 它会删除工作区,然后创建一个新工作区并下载必要的项目文件。

此外,您可能会考虑使用 Cruise Control 之类的东西来处理构建。

You number one way around this is to stop using web site projects. Web Site Projects cause visual studio to automatically add anything it finds in the project path to the project.

Instead, move to Web Application Projects which don't have this behavior problem.

Web Site projects are good for single person developments.

UPDATE:

VB shops from the days gone past had similiar issues in that whatever they had installed affected the build process. You might take a page from their playbook and have a "clean" build machine. Prior to doing a deployment you would delete all of the project folders, then do a get latest. This way you would be sure that the only thing deployed is what you have in source control.

Incidentally, this is also how the TFS Build server works. It deletes the workspace, then creates a new one and downloads the necessary project files.

Further, you might consider using something like Cruise Control to handle builds.

哆兒滾 2024-07-18 19:12:50

也许开发人员应该注意只检查或添加他们一直在做的事情。 如果他们添加了他们甚至没有使用过的东西,那就有点草率了。

Maybe the dev should take care to only check in or add things that they have been working on. Its kind of sloppy if they are adding things that they were not even using.

梦里寻她 2024-07-18 19:12:50

最好的解决方案是切换到更好的版本控制系统,例如 SVN。

在我的工作中,我们最近从一家外包公司收购了一个项目,该公司确实使用 VSS 作为版本控制。 我们能够将所有更改历史记录从 VSS 导入到 SVN,然后使用 SVN 快速启动并运行。

使用 SVN,您可以为文件和文件夹设置忽略,这样您的 Web 项目中的文件就不会放入 SVN,并且忽略属性会签出到每个开发人员的计算机上

我相信我们使用 VSSMigrate 来迁移到 SVN http://www.poweradmin.com/sourcecode/vssmigrate.aspx

Your best solution would be to switch to a better version control system, like SVN.

At my job we recently acquired a project from an outsourcing company who did use VSS as their version control. We were able to import all of the change history into SVN from VSS, and get up and running pretty quickly with SVN at that point.

And with SVN, you can set up ignores for files and folders, so the files in your web projects dont get put into SVN and the ignore attributes are checked out onto each developer's machine

I believe we used VSSMigrate to do the migration to SVN http://www.poweradmin.com/sourcecode/vssmigrate.aspx

冰葑 2024-07-18 19:12:50

VSS 是一个糟糕的版本控制系统,您应该切换到 SVN,但这与问题的症结无关。 项目文件包含对哪些文件实际上是项目一部分的引用。 如果 Visual Studio 项目没有连同对其所做的更改一起签入,则任何其他开发人员都无法完全更新,因此在从 VSS 获取最新版本时会查询删除文件。 从那里你有多种选择...

  1. 使 vbproj 成为存储库的一部分。 任何项目级别的更改都将成为提交的一部分,并且可以通知其他开发人员。 这里的问题是它也将出现在开发服务器上。 理想情况下,您可以使用与部署发布版本几乎相同的流程来部署到开发版本。 这导致了另一种方式...

  2. SVN 为您提供了几乎所有重大事件的钩子,其中钩子实际上只是一个正确命名的批处理文件/exe。 出于您的目的,您可以使用提交后挂钩在每次提交时将适当的文件(例如通过 ftp)推送到服务器。 文件问题解决了,更重要的是更接近持续集成的概念。

VSS is an awful versioning system and you should switch to SVN but that's got nothing to do with the crux of the problem. The project file contains references to what files are actually part of the project. If the visual studio project isn't checked in along with the changes to it, theres no way for any other developer to be fully updated hence queries to delete files when they grab the latest from VSS. From there you've got multiple choices...

  1. Make the vbproj part of the repository. Any project level changes will be part of the commit and other developers can be notified. Problem here is it's also going to be on the dev server. Ideally you could use near the same process to deploy to dev as you would to deploy as release. This leads into the other way...

  2. SVN gives you hooks for almost all major events, where hooks are literally just a properly named batch file / exe. For your purposes, you could use a post-commit hook to push the appropriate files, say via ftp, to the server on every commit. File problems solved, and more importantly closer towards the concept of continuous integration.

冷月断魂刀 2024-07-18 19:12:50

您可能需要考虑做的事情:

  1. 获取最新(递归)
  2. 签入...

它是一个手动过程,但它可能会给您带来所需的结果,此外,如果 VS 谈论已删除的文件,您知道它们应该从本地计算机中删除在步骤 1 中。

Something you may want to consider doing:

  1. Get Latest (Recursive)
  2. Check In ...

Its a manual process, but it may give you the desired result, plus if VS talks about deleted files, you know they should be deleted from the local machine in step 1.

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