I need to know what files and folders must definitely be added to source control, and what files/folders can be left out.
I know I can leave out bin/ and obj/, along with the .suo file since it's user-specific, but what about the rest of the tree?
FWIW, here's a one form + one module project:
Directory of C:\Projects\MyApp\WindowsApplication1
03/10/2011 15:04 3.040 Form1.Designer.vb
03/10/2011 15:04 5.814 Form1.resx
03/10/2011 15:08 2.903 Form1.vb
03/10/2011 13:40 194 Module1.vb
03/10/2011 13:36 <DIR> bin
03/10/2011 13:36 <DIR> My Project
03/10/2011 13:36 <DIR> obj
03/10/2011 13:36 934 WindowsApplication1.sln
03/10/2011 13:36 5.678 WindowsApplication1.vbproj
03/10/2011 13:36 74 WindowsApplication1.vbproj.user
Directory of C:\Projects\MyApp\WindowsApplication1\My Project
03/10/2011 02:51 1.522 Application.Designer.vb
03/10/2011 02:51 510 Application.myapp
03/10/2011 02:51 1.199 AssemblyInfo.vb
03/10/2011 02:51 2.807 Resources.Designer.vb
30/07/2008 06:54 5.612 Resources.resx
03/10/2011 02:51 3.058 Settings.Designer.vb
30/07/2008 06:54 279 Settings.settings
7 File(s) 14.987 bytes
Thank you.
Can we safely ignore those folders? bin/, obj/, and My Project/.
What about WindowsApplication1.sln and WindowsApplication1.vbproj.user?
On the Source Control Explorer tab, in the Folders pane, select the folder that contains the item or items you want to add. Click the Add Items to Folder button. In the Add to Source Control dialog box, select the folder or items you want to add, and then click Next.
"Add to Source Control" is shown when a solution or project or folder has not been opened - Visual Studio Feedback. Skip to main content.
Right-Click If you have the Content Explorer, Project Organizer, Pending Changes window pane, or File List open, right-click the file you want to add and select Source Control > Add.
Leave out all these (credit, also documentation).
Alternatively, find a visual studio plug-in for your source control system (e.g. AnkhSVN for SVN) and it will do it automatically.
Basically everything that was generated automatically by your toolchain (compliler, etc.) and can be re-created from your source code easily, should be left out. Anything that you wrote, source code, makefiles, etc., should be checked in.
Ask yourself this question: Do I need this file if I to compile this project on a different computer with a clean installation of my tools? If the answer is "yes", check in, otherwise not.
If you're not sure, experiment! Back up all files, then delete what you think is not necessary to check in, and see if your project still builds properly and that file is re-created automatically.
You need to version all the files that are either required for compilation/build or need at runtime. Here are some examples:
Compilation/Build:
Runtime:
You can ignore all other files/folders like .suo, .user, bin, obj, debug/release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With