Sharing modules across multiple solutions

Topics: Web Client Software Factory
Jul 14, 2009 at 9:37 AM

I've used WCSF (Jun 2007) to build a WAP application consisting of two modules. The shell module is used to represent the core product components while the second module is used for customer specific components. I created the customer specific WAP project as a sub folder of the main WAP.

The main reason I choose the WCSF  was the ability to reuse core product components (view, presenters, business services etc) in multiple solutions with different components for different customers. I've now come to the stage where I need to create a new solution for other customers and I'm not sure what is the recommended/best way to do this. 

My first attempt at re-using the product module was to create a new solution and map the core product WAP project in VSS to a new folder along with its modules etc. However I needed to modify the web.config file as it contained customer specific config data, however I can work around this with multiple config files, but its not very nice as I end up with multiple sets of config files per customer in the core product WAP project. Another problem is that I'm using IIS for the WAP project server and I want different virtual directories for different customers, so I can run them at the same time if needed. However this means that I have to edit the WAP project every time I switch solutions so that it points to the correct virtual directory.

I'm looking for alternative methods of sharing the shell modules. Some options I've though of are:

1. Switch my projects around so that the customer specific components forms the shell and the core product components are the sub-folder WAP project. I haven't tried this as I assume it would involve lots of manual editing of project and solutions files. Anyone with experience of this?

2. Create new customer modules in the separate solutions and then deploy them (using XCopy) into the web-site installed from the core product solutions. This seems like the best option but I'm not sure how to construct the solution (sln) for the new module, do I still need to reference/copy the core product shell view, presents etc. ? if so then I've still got the problem with the .config and .csproj  files. If I create a new shell then do I need to put anything in it ?

3. Scott Gu described a method  of sharing pages and user controls across non-WCSF project by publishing the application and then copying the published files to the new project. Has anyone tried this with a WCSF project ?

4. any other ideas ?

Thanks,
kitog.