Side-Projects instead of sub-projects? RRS feed

  • Question

  • User-850001062 posted


    i have a solution with a web application project (webA) and two library projects for data access and business layer (a library project (dal), another library project (bl)).

    I have a solution folder for these projects - its structure is:


    - webA




    WebA has the following structure:


    -controls (folder containing user controls *.ascx)

    -Master  (folder containing master pages *.master)

    - library (folder)

    -  img (folder containing images)

    - js (folder containing *.js)

    - styles (folder containing *.css)

    - (various other folder - specific to WebA)

    - web.sitemap, web.config and default.aspx (files in the root of WebA)

    WebA is running on a domain of its own (say www.webA.com).

    Our customer now ordered another web application (lets call it WebB). This web should run on its own domain, too (www.webB.com). This web should have the some corporate identity used in WebA, so i want like to use the Master pages, some of the user controls and the library folder of project WebA.

    I read http://blogs.msdn.com/webdevtools/archive/2006/08/15/701642.aspx on creating subprojects. What i need now is more like a "side-project". As WebB should not be a sub-project, and should have its own web.config and domain too i'm wondering how to accomplish this.


    So far i tried to add a WebB web application project to the solution (side by side with the project folders in the solutionFolder). In there i added a reference to project WebA. In the root of WebB i tried to reference the Master page in the default.aspx like so:

     <%@ Page Language="C#" MasterPageFile="../WebA/Master/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebA.Default" %>
    <asp:Content runat="server" ID="c1" ContentPlaceHolderID="cph1">Here is my WebB content!</asp:Content>

    but this won't work as i can not reference something outside of webB (the ../WebA/... in the MasterPageFilde Attribute won't work).


    I also thought about adding build events to WebB to copy the needed folders (Master, Controls, library) but this whould be very stupid to copy all the images on every build.


    Can someone please suggest how to solve this problem? I've no clue about how to resolve this in a smart way.

    thanks, tob


    Tuesday, July 1, 2008 4:59 AM