Visual-studio – Mercurial .hgignore for Visual Studio 2008 projects

hgignoremercurialvisual studiovisual-studio-2008

What is a good setup for .hgignore file when working with Visual Studio 2008?

I mostly develop on my own, only occasionly I clone the repository for somebody else to work on it.

I'm thinking about obj folders, .suo, .sln, .user files etc.. Can they just be included or are there file I shouldn't include?

Thanks!

p.s.: at the moment I do the following : ignore all .pdb files and all obj folders.

# regexp syntax.
syntax: glob
*.pdb

syntax: regexp
/obj/

Best Answer

Here's my standard .hgignore file for use with VS2008 that was originally modified from a Git ignore file:

# Ignore file for Visual Studio 2008

# use glob syntax
syntax: glob

# Ignore Visual Studio 2008 files
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
[Bb]in
[Dd]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml