简体   繁体   中英

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 . Do I include the Project.sln file, bin/ and obj/ folders?

I would recommend using the hgignore detailed in this SO post

there is one that has 100+ up votes that would be a good starting point

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.

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. 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.

Here's an MSDN article called Introducing Source Control . It lists files you can and cannot add to source control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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