Multiple editions management with VS2005

Hi All,

Here is thebig question:

Suppose to need to compile the Basic, Standard and Pro editions of you

app. What will you do inside VS2005? (each edition contains adifferent set of file/classes but, obviously, the most are shared between each edition)

1) I create 3 project (Basic, Standard and Pro) andlink the shared files/classes from the first.

2) I use conditional compiling, placing the classes inside an #if PROEDITION #endif statement.

3) I build 3 different asseblies and merge them using ILMerge.

4) Other.

Thanks so much for your thoughts, I want to start with the right foot!

Alberto

[731 byte] By [devdept] at [2007-12-25]
# 1

I think it really depends how much code is shared between the three versions and if the applications have been designed from the ground-up with this separation in mind.

If the applications were not designed from the ground-up with this separation in mind then conditional compilation, and use of the Conditional attribute may be the easiest option until the applications are refactored to ease the division.

Solution one you mention is the most common except there would often be a fourth project (Common) which contains classes shared between the three.

Regards,

William Bartholomew

WilliamBartholomew at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 2

Thank you William,

I already thought about the Common Project, but the compiled result is useless. What do you think?

I wanted to work with 3 different assemblies, and adding all those file links sounds like: not the 'right' way to do it.

Is it possible to manage this - fairly common - situation more elegantly?

Thanks again,

Alberto

devdept at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Why do you feel the compiled result of the Common Project is useless? It would be a Class Library project whose compiled result would be included in the three editions.
WilliamBartholomew at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

Because in this way for the Standard Edition I have to reference the Common.dll and the Basic.exe and for the Pro edition I need to reference the Common.dll, the Basic.dll and the Standard.dll

Doesn't look like the best way? Does it?

devdept at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...
# 5
I think you're best approach would be to have your assemblies broken into modules (for example Customer Management, Order Management, etc.) and then you can reference the appropriate modules for each edition.
WilliamBartholomew at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# General...