Donal,
From my perspective, you should not be sharing code files between
assemblies. What you should be doing is creating an assembly with the logic
you desire, and then referencing that assembly from the new assemblies you
want to use. That being said, here are your answers:
- from the perspective of visual studio project structures
You will add another project with one class in it, and reference the
original class library.
- visual sourcesafe code sharing
Not an issue, since you will not be sharing the code, you will be
referencing the assemblies that have the functionality you need.
- assembly merging
Do you mean using multiple modules, or actually merging two assemblies
(which is not possible, AFAIK).
- usage of #ifdef directives
Don't do it. I've seen very few situations where ifdefs lead to more
clear/concise/easily-maintained code. You are only asking for trouble here.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Donal McWeeney" <ma****@newsgroup.nospam> wrote in message
news:Oy**************@TK2MSFTNGP15.phx.gbl...
I have a big Visual Studio class library project from which I create an
assembly. This assembly for example might contain 100 public entry points
(for example custom server controls) and a load of shared back-end library
code that they use.
I now have a need to create 2 new separate small assemblys from the same
code base, with one public entry point in each. For example I want to
bundle 2 public server controls, each into their own individual assemblys.
These assemblies will also be obscured and installed as standalone
components.
So the question - what is the best way to go about achieving this:
- from the perspective of visual studio project structures
- visual sourcesafe code sharing
- assembly merging
- usage of #idef directives etc
Thanks
Donal