Committing LightSwitch applications using Subversion and/or TortoiseSVN

Published 3 October 12 4:49 PM | jglass

This is not quite a trivial ordeal!

The problem isn't knowing which swaths of files in the lightswitch project's folders are worthy of exclusion.  That is discussed in a very nice SO article, here:

http://stackoverflow.com/questions/7114453/lightswitch-project-which-files-to-check-in-and-which-to-ignore

 

The problem, is in Subversion's inability to recursively apply a local ignore list to directories that do not yet exist in the repository.

If that doesn't make sense, just read along and it will start to.  Here is the process to commit a LightSwitch project into SVN:

1. Right click the top folder for the LS project and go to "TortoiseSVN/Add"

2. Un-select all, and then reselect only the top-level folder (none of its children).  Then commit this folder so the top level folder is added to the repo.

3. Browse into the folder, and select all folders here except for _Pvt_Extensions, and Bin.

4. Right click one of them and select "TortoiseSVN/Add".

5. Again, un-select all, and reselect only the top-level folders that were selected in step #3.  Commit the folders so they are added to the repo.

6. Go to the top level LS folder and go to "TortoiseSVN/Properties".  Add a property for "svn:ignore" and give it the following newline-separated values:

 

_Pvt_Extensions
 GeneratedArtifacts
Debug
Release
bin
obj
Bin
Obj
*.user
*.suo

(Yes, the list only applies in a case-sensitive way.)
7. Be sure to select "Apply property recursively", and click OK.
8. When you now select "TortoiseSVN/Add" on the top level LS folder, only the appropriate files will be available for adding to the repo.  There will still be a few straggling dlls in folders like Client/Common/bin, but believe me--take what you can get, and just deselect them manually at this step.
It is a tremendous PITA for what ought to be such a simple thing, but it works!