Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Visual Studio files should be ignored by subversion to minimize conflicts?

I am supporting a number of .Net developers who are using Subversion to version control their work, but we have been running into a number of issues that seem to revolve around the additional files that Visual Studio uses to manage projects, do debugging, etc. Specifically, it seems that these files are causing conflicts due to the fact that they are already in the repo. I know how to get them out and how to handle them, but I need to know what "they" are first.

So, what are the files/directories that Subversion can ignore, and why can they be ignored?(aka. what do those files do?)

This is a large, rather un-organized ASP.Net site and deploying the site is done via. svn updates, so files needed by IIS to dynamically compile (I think that's what it is) the site as files change needs to be left in the repo.

like image 578
cdeszaq Avatar asked Feb 25 '09 21:02

cdeszaq


People also ask

How do I ignore files in Visual Studio?

Visual Studio Team Explorer In the Changes view of Team Explorer, right-click any changed file that you want Git to ignore and choose Ignore this local item or Ignore this extension.

What does svn ignore do?

The svn:ignore property is a good way to tell Subversion to ignore files that are likely to be present in every user's working copy of that directory, such as compiler output or—to use an example more appropriate to this book—the HTML, PDF, or PostScript files generated as the result of a conversion of some source ...

What is svn in Visual Studio?

VisualSVN is a transparent integration of the Subversion version control system to the Visual Studio development environment. VisualSVN allows you to take full control on any changes in the project that are made by you or your colleagues.


2 Answers

  • bin and obj directories
  • *.user files (MyProject.csproj.user)
  • *.suo files

Also, if you are using Visual Studio 2015 the .vs directory.

like image 136
Shawn Miller Avatar answered Sep 21 '22 03:09

Shawn Miller


I have had good luck with this global ignore pattern:

*bin *obj *suo *.user *.tmp *.TMP  *resharper* *Resharper* *ReSharper* *.Load *.gpState  Thumbs.db *.~m2

I am running the Resharper plugin, so you can probably ignore that. ".~m2" is for a temporary file my data modeler creates.

Update: Thanks for the up-vote. I've recently added Mac, Dreamweaver, Python, and a few more Visual Studio files that should be ignored.

*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp *[Bb]in *obj *suo *resharp* *.user *.tmp *.TMP *Resharper* *ReSharper* *.Load *.gpState *.NoLoad  *.~m2 *.dbmdl _notes *.cache [Tt]est[Rr]esult [Bb]uild[Ll]og.* *.[Pp]ublish.xml *.[Cc]ache [Tt]humbs.db lint.db *.docstates .apdisk [Ll]ogs .DS_Store *.bak *.vs 

Something else, if someone accidentally checks in a folder or file that should be ignored, then you will need to manually remove the files from the repository before SVN will start ignoring them again. This is because files that are already in the repo will override any ignore settings.

like image 39
Jamison Avatar answered Sep 20 '22 03:09

Jamison