Versioning with Visual Studio 2010 and HG

Recently me and my team got a HG repository for versioning as this would make it easier and better to develop our application.

We are using Visual Studio 2010 and c#

  • Move files in Visual Studio and AnkhSVN simultaneously
  • VersionControlServer - Get latest version of file at a specific date/time
  • Looping through every commit in Git repository with LibGit2Sharp?
  • howto setup codelite for existing git project
  • Get a blob from a commit?
  • I need a workaround for Resharper when it says 'Failed to modify Documents'. Does anybody know why it does this and how to get around it?
  • All of the project is under version control..

    Unfortunately, when one of us commits, usually the other gets an error of some kind when opening the solution (due to the various files VS has)

    My question is: what files should be put under version control? (and removed in my case!)

    PS: we have 3 Projects: (using XNA) game, contents, test

    Thank you very much!!!

    Dan

  • “Unregistered Git root detected” because parent directory of project is versioned by Git
  • How to embed an updated git-hash into Version.hpp?
  • Listing all commits in a branch using libgit2
  • Does it make sense to use source control to manage graphics files (e.g. PSDs & AI files)
  • Vault to Git to Mercurial not preserving dates
  • How can I get the equivalent of .hgignore's regular expressions ^var/(?!\log|.dummy) and ^var/log/(?!\.dummy) in .gitignore?
  • 4 Solutions collect form web for “Versioning with Visual Studio 2010 and HG”

    At least you need these in your .hgignore:

    syntax: glob
    bin
    obj
    *.sln.cache
    *.suo
    *.user
    

    Add as needed. But don’t overignore as you can lose data that way. For instace @Darin’s answer causes you to stop tracking of private key files (.snk).

    I use below and it came from Rob Conery on his tutorials for mercurial (http://tekpub.com/view/hg/1 & http://tekpub.com/codeplex) at tekpub. It’s on a git repo and was originally for VS 2K8 but works just fine for 2K10. http://gist.github.com/314082

    syntax: glob

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

    Here’s a list of files and directories I exclude from version control in the case of directory I exclude recursively everything from this directory):

    bin/
    obj/
    TestResults/
    *.vspscc
    *.user
    *.snk
    *.suo
    *.vssscc
    *.gpState
    Debug/
    Release/
    

    Here are a few more:

    *.ncb
    *.sdf
    *.ilk
    *.aps
    *.resharper
    _ReSharper*
    *.Cache
    
    Git Baby is a git and github fan, let's start git clone.