Need advice setting up Solution file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dihola
    New Member
    • Nov 2007
    • 7

    Need advice setting up Solution file

    Hi all,
    I am developing 2 websites (A and B) that share a lot of pages and classes, and I wonder if I am doing it
    the right way. I have extracted the common classes and created master pages for all common pages in a
    third project (C), as follows (roughly simplified):

    --C
    ---page1.master
    ---page2.master
    ---commonclass1.cs
    ---commonclass2.cs

    --A
    ---page1.master
    ---page1A.aspx
    ---page2.master
    ---page2A.aspx
    ---commonclass1.cs
    ---commonclass2.cs
    ---classA.cs

    --B
    ---page1.master
    ---page1B.aspx
    ---page2.master
    ---page2B.aspx
    ---commonclass1.cs
    ---commonclass2.cs
    ---classB.cs


    I have created a solution file for websites C and A, and another for B and C. Although A and B are quite
    similar, I'd like to keep them separate for developers, as they would work on either one or the other
    but not in both at the same time, so in Visual Studio they can only access the files relative to their
    project.

    I have created a pre-build script for both A and B by which before each build, it copies the common files
    from C (master pages and common classes).

    Because the files in C will barely change and development will concentrate in both A and B, I only really
    need to copy the files from C occasionally, not every time A or B are built.


    I can't see any advantage so far in using the solutions I have created so I wonder if I am using them
    properly. I could easily have created 2 completely separate projects for A and B and a simple .bat file
    to copy things across from C whenever I needed. Ideally I would only copy the files from C when I need
    to deploy either A or B, simply referencing the master mapes and common classes from C. However I coul not
    get this to work. When I attempted this and opened the solution file, pages in A referencing code in C
    would not work, as the classes in C wouldn't be available from A.

    Can anyone give me some hints on how could this be achieved?

    Thanks very much for your time.
Working...