views:

435

answers:

3

Working on an intranet where we have about 20 different web apps - some .net, some classic asp.

Currently each .net app is its own solution. There are advantages to this - we can build & deploy just one app, without affecting other apps, and all the apps share a session - but we can't use master pages, and there are real challenges using localization resources, shared css and js, etc. Build & deployment is done completely manually, which is a real problem.

I'm trying to set up a structure that will allow us to take advantage of VS2008 features, but still have the ability to update one app without affecting the others while still using features like master pages and localization resources, and sharing session between apps (so we can't set up virtual directories for each app).

If I set up single solution that looks like:

/Root
 - App_GlobalResources/
 - shared
   -- masterpages/
   -- css/
 - App1/
 - App2/
...
 - AppN/
..
 - ClassicASP1/

then the problem is that the build just produces a single DLL (Root.dll) - this will simply not scale to 20+ apps, all of which have different development cycles.

Is it possible (using nant, or some other build tool) to build multiple DLLs? In this case, I'd like to end up with Root.dll (contains the global resources at least) and App1.dll and App2.dll.

Any other suggestions or references I should look at?

+1  A: 

I'm not sure you can do what you want to do, sadly. VS tends to make one DLL per unique project (not solution), and it appears you have just one project, so hence, one DLL.

I'd suggest you keep one project (csproj) per application, but use NANT to build them all (ie, one at a time, together, in order), and package them all up for deployment. That way you can do a single point deployment, but still keep the apps seperate.

I'm surprised you can't use master pages in the sub-folders. You'd need to replicate them for each AppN folder, but again - NANT could be used to pull those in from a common place when you build your deployment package.

Writing a build and deployment script takes a while to get right, but I've found that once it's done, it pays for itself very quickly - even if the only payment is your sanity!

Nic Wise
A: 

Hi there,

There is a solution to this problem. In short, it entails creating a Web Site Project (which can have the masterpage and whatnot) and several subdirectories, each containing a web project. In the main web project you exclude the subdirs from the project. You then add the project files to the solution. This (updated) link tells you all about it.

-Edoode

edosoft
thanks for the link, but that solution only applies to RUNNING multiple apps as a single app under IIS, and seems to only apply to 1.1. The problem we're trying to solve is having multiple web apps that share common master pages, localization resources, etc - which isn't addressed in that link.
chris
Hmm, you're right. I've updated the link. That page describes my (working) setup with sub-projects.
edosoft
A: 

I would advise using MSBuild instead of Nant. It is more native to visual studio.

JustEngland
Why? Do you have experience with both? The problem is that VS won't let me do what I need to do, so finding another product that may ignore VS conventions may be a good thing.
chris