开发者

How do I put an ASP.NET website project and class library projects in one .sln file on Subversion

My company has several class libraries we use in mu开发者_StackOverflow中文版ltiple website projects (not web application projects). Website projects don't have .sln files, but I'm sure I've read in my past research that you can make a blank solution and put your website and class library projects in it.

After answers to my previous questions, this is the direction that I'm going (based slightly on http://amadiere.com/blog/2009/06/multiple-subversion-projects-in-one-visual-studio-solution-using-svnexternals/):

/websites
    /website1
        /trunk
            /website1
/libraries
    /library1
        /trunk
            /library1
    /library2
        /trunk
            /library2
    /etc...

Then I planed on using svn:externals to copy /library1, /library2, and so on into the working_copy/websites/website1/ folder.

I want my team members to be able to checkout the /trunk folder for website1 and get a .sln file, /library1 external, /library2 external, etc. I want that .sln file to contain the website1 website project, and all of the library external projects. Hopefully that would look something like:

/working_copy
    /websites
        /website1
            /trunk
                /website1
                /library1 (svn:external of libraries/library1/trunk/library1) 
                /library2 (svn:external of libraries/library2/trunk/library2)
                /etc.
                website1.sln

So, at the end of all of this, the goal is that my teammates check out the trunk, open the solution, and everyone has the exact same solution. When we commit, everything is committed appropriately to subversion (the website code, and the libraries are committed to their appropriate place on the repo).

How have others solved these issues? How can I make a .sln file that my team members and I can share in this manner?


I think your approach about svn code and solution file structure is the right one. Also it is a good idea to use svn:externals as you described.

To create blank solution just select File->New->Project and choose Other Project Types->Visual Studio Solutions->Blank Solution. After you created it you can add new or existing projects to it using menu File->Add.


It's a bad idea to put the library projects into the same solution as the web site project. Leave them in their own solution. In the web site project, right-click the project in solution explorer and choose "Add Reference". point to where you saved off the built library code (maybe on a file share).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜