views:

37

answers:

2

The issue at hand is this.
We have a web application with two different versions, a full application, and a light version of it. In it's most part the light version is a subset of the full version, which means that it uses the same web pages and references the same binaries with the full version.

However, some of the pages of the full version should not be deployed with the light version obviously, and some binaries (libraries etc) need not be deployed with the full version.

If it were a windows forms application we could attempt to approach the issue at hand with preprocessor directives, unfortunately this is not feasible I think. (please do correct me if I'm wrong with this)

Anyway, what would be a good approach on this? Thanks

A: 

Simple is good. Just use two solution files and change your includes accordingly. The downfall (which you really have with precompiler directives also) is that you have to remember to recompile both after you make changes.

gbogumil
That was my initial approach, but the problem is that I want to keep all the web pages in the same folders. So if I change the code it will be changed on both versions. However, the solution file does not specify the files in a folder to include, rather the folder with the pages. If I exclude the files on one solution, then they are excluded from the other solution as well since visual studio changes there extenstion to .excluded. So that does not work either.
Nikos Steiakakis
Can't you use shortcuts from the main projects?
Mendy
Try a web application project instead of a web site project.
Jennifer Zouak
+2  A: 

Why not have one solution with two (or double what you currently have in one) projects.

In the Lite version rather than have a copy of the file if you choose to "Add existing item" the Add button has a little drop down which will allow you to "link" to an existing file in the Full version rather than add a copy.

This might help with the "edit once" scenario.

Kindness,

Dan

Daniel Elliott
Great! It works! The only problem I had was that the project was of type WebSite and had to convert it to WebApplication in order to accept linked items, but now it is ok! Thanks!
Nikos Steiakakis
Glad to help! :)
Daniel Elliott