I'm working with a group that's been doing C++ coding for quite a long
time, now, and in that environment we've pretty much worked out
development practices that serve us well.
We've been doing more and more, over the last few years, in C# and
ASP.NET. Some web apps, some background services.
In our C++ code base, we have a fair number of statically-linked
libraries that contain code we share between projects. At this point, in
our C# code, we have only separate files in each project containing
similar code.
We would like to move those separate files containing similar code in
each project to single files shared between projects, the way we have
been doing with our statically-linked libraries. We just haven't quite
figured out what is the best way of doing it.
What would seem most obvious is simply to create DLL projects for each of
our shared class collections, and to reference the DLLs in the main
projects. The problem is that the main projects have different release
schedules. Each would have to ship with different versions of the shared
DLLs. That means, of course, that we'd need to create a tag in version
control on every shared DLL for every release. No big deal. We'd have
to do the same with statically-linked libs.
But to complicate things, we have some customers who have multiple
projects installed. And that means that we will have customer machines
with different versions of the shared DLLs installed for different
projects. And that's when our support staff starts to scream.
Is there a way of sharing code between projects so that it ends up in a
single assembly, instead of requiring separate DLLs? Someone recommended
using the "Add as Link" option of "Add Existing Item", but I'm not sure
that really addresses the problem I'm talking about, and it doesn't seem
to work in Web Apps anyway, and we need a solution that works in both.
(You can assume that we will have some classes that will be shared across
all web apps, some classes that will be shared across all non-web apps,
and some classes that will be shared across all apps, web and non-web
both.)
Any ideas?
What should I be looking at?
--
Freedom is not empowerment. Empowerment is what the Serbs have in
Bosnia. Anybody can grab a gun and be empowered. It's not entitlement. An
entitlement is what people on welfare get, and how free are they? It's
not an endlessly expanding list of rights - the 'right' to education,
the 'right' to health care, the 'right' to food and housing. That's not
freedom, that's dependency. Those aren't rights, those are the rations
of slavery - hay and a barn for human cattle.
-- P.J. O'Rourke