VS2005 和 VSS。 .exe、.dll、pdb、.resource 和生成的 .xml 文件是否应该放入 VSS 中?
似乎以下类型的文件需要可写才能编译解决方案。 。EXE文件 .dll .pdb(如果调试) .资源(?) .xml(至少是系统生成的。我不确定它们是否只是所有 XML 文档文件)
如果它们已签入并且只能由签出它们的人由编译器覆盖,然后将它们签入sourcesafe 并需要签出来修改它们(每次运行时编译器都会尝试这样做),这会干扰其他开发人员调试和运行的能力。
最佳实践是什么?看起来 VSS 会自动添加所有内容。
It seems like the following type of files need to be writable to be able to compile a solution.
.exe
.dll
.pdb (if debugging)
.resource (?)
.xml (at least the system generated ones. I'm not sure if they are just all XML documentationf iles)
If they were checked in and could only be overwritten by the compiler by the person who had them checked out, then checking them into sourcesafe and requiring a checkout to modify them, which is attemtped by the compiler each time you run, would interfer with other developer's ability to debug and run.
What is the best practice? It seems like VSS automatically adds everything.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通常,您不想签入生成的任何文件,除非您生成一次它们,然后使用其中的文件“剪切并运行”(即您永远不会重新生成它们)。对于像 VSS 这样使用单检出锁的版本控制系统尤其如此。
如果您想对生成的文件进行版本控制,我建议不要在解决方案/项目位置对它们进行版本控制,而是有一个单独的过程将它们复制到其他地方,并在那里检查它们。如果您在 sln/proj 中对生成的文件进行版本控制,那么您将与人们进行噩梦,将它们签出并返回。
我相信您可以将 VSS 设置为不对签出进行独占锁定,但总的来说,我会留下来远离签入生成的文件。您应该尝试让您的系统达到这样的程度:如果您需要返回到生成文件的先前版本,您可以签出“源”文件的适当版本/标签,并从那里重新生成其他文件。
Normally, you don't want to check in any files that are generated, unless you generate them a single time, then "cut-and-run" with the files from there (i.e. you never regenerate them). This is especially true for version control systems like VSS that use a single-checkout lock.
If you want to version generated files, I would suggest not versioning them in the solution/project locations, but have a separate process that copies them somewhere else, and checks them in there. If you version generated files within a sln/proj, you'll have nightmares fighting with people to check them out and back in.
I believe you can set VSS to not do an exclusive lock on checkouts, but in general, I'd stay away from checking in generated files. You should try to get your system to the point where if you need to go back to a previous version of a generated file, you checkout the appropriate version/tag of the "source" files and re-genenerate the other files from there.
一般来说,作为构建过程的一部分创建的文件不会被签入版本控制。
但是,您很可能希望归档所有或部分这些文件(可能在特定的里程碑,特别是如果您将它们发布到开发组织之外),以防您需要处理在测试或通过过程中发现的问题报告/错误。最终用户。
您是否希望归档发生在与源工件相同的仓库中(甚至使用相同的版本控制软件)是一个不同的决定。通常,这种类型的存档并不是真正的版本控制系统,而可能是一个网络共享,其中的目录遵循特定的命名约定,因此这些工件可以与源的特定修订版相匹配。如何管理这些项目的生命周期(以及生命周期应该是多少)是另一个问题,需要根据特定组织的需求和策略来确定。
In general files that are created as part of the build process are not checked into version control.
However, you very well might want to archive all or some of these files (maybe at specific milestones, and in particular if you release them outside of your dev organization) in case you need to deal with problem reports/bugs found in testing or by end users.
Whether you want that archiving to occur in the same depot (or even using the same version control software) as your source artifacts is a different decision. often an archive of this sort isn't really a version control system, but might be a network share that has directories that follow a particular naming convention so the those artifacts can be matched to a particular revision of the source. How the lifetime of those items are managed (and what the lifetime should be) is another issue that needs to be determined by the needs and policies of your particular organization.
Visual Studio 在选择要添加到源安全的正确项目方面做得很好。设置新项目时,使用项目上下文菜单或文件菜单中的命令。
一个常见的错误是从 VSS 添加文件夹。
Visual Studio does a good job of selecting the right items to be added to source safe. Use the commands from project context menu or from the file menu when setting up a new project.
A common mistake is to add the folder from VSS.