Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conventions for storing Visual C# projects in an SVN repo

Basically my question is what parts of a C# do you store in a repository? In a class I took last year, I was told that you never store generated files in version control (so if you are writing c, dont store the .o/.exe files).

But it is easy with c, because you just save the .c, .h and makefile, and you can just checkout the repo, run the make file, and everything works.

But with C# projects in Visual Studio I am having some problems deciding what to store.

If I store just the .cs files, it is awkward to add them to the project on other computers. Am I supposed to store the project file too?

The problem I am running into is that I used to just store the whole project directory. But then when I would put the project on a different computer, it would complain that the temporaryKey is wrong (.pfx file)...

So what am I supposed to store?

Thanks.

like image 839
Toadums Avatar asked Dec 16 '22 22:12

Toadums


1 Answers

They way I do it - I am storing everything except:

  • bin and obj directories of each project in solution
  • .user and .suo files - they contain user-specific project and solution options
  • Resharper generated files (the Resharper is an Visual studio extension that creates some files in solution folder)

Basically, rule of thumb is not to store anything that is specific to a particular machine or is generated by a tool (be it a compiler or a Visual Studio extension - like Resharper in my case).

like image 90
Nikola Anusev Avatar answered Jan 30 '23 14:01

Nikola Anusev