Hi there, I'm currently working on an ASP.NET project with multiple developers using Subversion for code distribution, but it's quite frankly totally messed up at the moment. The person who set up the Subversion repository have included config files specific to their computer, bin\* directories, and other such things.
I, being the guy who has to check out this repository and get it to run on my computer, am pretty frustrated by this since it's taken me a while to sort it all out to get it to compile at all. Now I'm thinking about writing a document for Subversion guidelines to send to the technical leader at my company so that we can get the process standardized and avoid these kinds of problems.
What I'm looking for is input on the guidelines. Here's the start for them, and hopefully we can make something good out of it:
The file structure should be set up to have third-party libraries checked in outside the build output directories (since they won't be included in the repository.) The name of this directory should be "Libraries".
No machine-specific files should be included in Subversion. Therefore, only a template of Web.config is checked in, which is customized by the developers to suit their machine. This behavior is included in Visual Studio 2010 by default and the individual configuration files (
Web.Local.config
) automatically have the template (Web.config
) applied. The local configuration file still shouldn't be included in Subversion though, so long as it applies for a specific machine.Solution and project files must not contain any absolute paths.
An ignore list should be set up. Start with:
' *.user obj '
Example file structure for an ASP.NET 2.0 web site with a class library specific to the web site and a third-party library:
' /trunk/ Libraries/ ThirdParty.dll MyClassLibrary/ bin/ [Ignore] obj/ [Ignore] Properties/ AssemblyInfo.cs SomeClass.cs MyClassLibrary.csproj - Holds references to third-party libraries. For example: ../Libraries/ThirdParty.dll MyWebApplication/ bin/ ThirdParty.dll [Ignore; copied by build process] ThirdParty.dll.refresh - Contains "../Libraries/ThirdParty.dll" Default.aspx Default.aspx.cs Web.config [Ignore] Web.config.template MySolution.sln - Holds list of projects. - Has reference information for projects. '
An alternative to using
Web.config.template
would be to include aLocal.config
file fromWeb.config
, but this might be less flexible.When using a Web Application project rather than a Web Site project, the references will be stored in the project file instead of in .refresh files, so the bin/ folder will be ignored.
Can someone see errors in the above suggestions? Is something missing? Does anyone have suggestions for the ignore list? I just started with a couple of entries for now.