简体   繁体   English

将Mercurial与Visual Studio / VB.Net项目一起使用

[英]Using Mercurial with a Visual Studio/VB.Net project

I want to start using Mercurial on a VB.Net project, but I'm not sure which files should I add . 我想在VB.Net项目上开始使用Mercurial,但我不确定应该add哪些文件。 Do I include the Project.sln file, bin/ and obj/ folders? 我是否包含Project.sln文件,bin /和obj /文件夹?

I would recommend using the hgignore detailed in this SO post 我建议使用这篇SO帖子中详述的hgignore

there is one that has 100+ up votes that would be a good starting point 有一个有超过100票的投票,这将是一个很好的起点

With every source control, you should only include source files (ie files that are not generated during the build process), and the complete set of files necessary to build a solution. 对于每个源代码控件,您应该只包含文件(即在构建过程中不生成的文件),以及构建解决方案所需的完整文件集。 This does include the .sln file (for ease of use of the project in Visual Studio) but not the bin and obj folders, nor (usually) the user-specific settings ( .suo ), nor auto-generated files that can be re-generated. 这包括.sln文件(为了便于在Visual Studio中使用项目),但包括binobj文件夹,也不包括(通常)用户特定的设置( .suo ),也不包括可以重新生成的自动生成的文件 - 生成。

A good rule of thumb is to only include things that you cannot easily regenerate. 一个好的经验法则是只包含你不能轻易再生的东西。 So, source code obviously meets this role and so does resources like images, sounds, and other data you need. 因此,源代码显然可以满足此角色,您需要的图像,声音和其他数据等资源也是如此。 Objects and the actual binary you generate from the source code usually are easy to get again and generally do not need to go in. 对象和从源代码生成实际的二进制通常很容易重新获得,一般不需要犹豫。

As for the sln file, if you will be making edits to the sln file and that's how others are to build the project, then you probably want to include that as well. 至于sln文件,如果你要对sln文件进行编辑,那就是其他人如何构建项目,那么你可能也希望包含它。 If you generating the sln file from some other process (eg, a script generates the sln and then builds it from that), then it's probably a good idea to leave that out. 如果你从其他一些进程生成sln文件(例如,一个脚本生成sln然后从那里构建它),那么将它留出来可能是个好主意。

Here's an MSDN article called Introducing Source Control . 这是一篇名为Introducing Source Control的MSDN文章。 It lists files you can and cannot add to source control. 它列出了您可以并且无法添加到源代码管理的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM