Search code examples
asp.netsvnrepositoryankhsvn

Create new ASP.NET Website using Subversion and AnkhSVN


I'm trying to create a new ASP.NET website and add it to my subversion repository but it does not work because subversion only add the C:\Users\XXX\Documents\Visual Studio 2008\Projects\WebApplication1 folder and ignores the project files located in C:\Users\XXX\Documents\Visual Studio 2008\WebSites folder.

Why can't I add a ASP.NET website to Subversion like WindowsFormsApplications?

How shall I add a ASP.NET website to Subversion repository?


Solution

  • I have a suggestion for a solution that fixes the problem, but I do not know how good the solution really is... can someone evaluate this?


    1) Create two folders in repository(svn://localhost/repo/):

    Projects

    WebSites

    2) File -> New -> Web Site (WebSite1)

    3) Right click the Solution 'WebSite1' in the solution explorer and choose "Add solution to Subversion" and choose Project Name WebSite1 and Repository Url svn://localhost/repo/Projects/ with the Local Folder C:\Users\UserName\Documents\Visual Studio 2008\Projects\WebSite1 and click "Add trunk Folder for Project", the project will now be created in svn://localhost/repo/Projects/WebSite1/

    4) Right click the Solution in the solution explorer and choose commit

    5) Right click the c:\...\WebSite1\ in the solution explorer and choose Project Name WebSite1 and "Add Selected Projects to Subversion" and choose Repository Url svn://localhost/repo/WebSites/ with the Local Folder C:\Users\UserName\Documents\Visual Studio 2008\WebSites\WebSite1 and click "Add trunk Folder for Project", the project will now be created in svn://localhost/repo/WebSites/WebSite1/trunk/ at last choose "Mark as Managed by Subversion"

    6) Right click the Project in the solution explorer and choose commit

    By doing this way the files in the Projects and WebSites folder gets loaded in to the Subversion repository and you have ability to create branches, tags and trunks.

    I use SlikSVN(Subversion) and AnkhSVN(Visual Studio Subversion Interface) when i do this.