Compiling Assemblies that can use later versions of CSLA?

Compiling Assemblies that can use later versions of CSLA?

Old forum URL: forums.lhotka.net/forums/t/5859.aspx


dagware posted on Sunday, November 23, 2008

I work with a team of developers who all work on various projects. They often use different versions of CSLA (3.0.2, 3.0.4, 3.5.1, etc). Yes, I know we should all use the same versions, but that's a discussion for another time.

I've written a handful of class libraries that use CSLA. If I compile one of these against, say, CSLA 3.0.2, and a developer wants to use it with CSLA 3.0.4, they either have to recompile it, or add a  "dependentAssembly" entry in their app.config file. This isn't horrible, but if the class library also installs components in the Visual Studio Pallette, it becomes more difficult.

So currently I compile multiple versions of my libraries, each using a different version of CSLA. This makes it easier for the developers to use the libraries without any extra work. However, this is a PITA for me.

What I'd like to know is, what other ways are there to handle this? For instance, can I compile a class library against version 3.0.2, yet tell it that it's OK to go ahead and try to use a later version if that's what's referenced in the developer's project, so the developer doesn't have to add a dependentAssembly entry?

If not, and the best thing is to compile multiple versions, any ideas on how to automate this? Right now I put all the sources in a shared folder structure, and create multiple projects that all link to these files. Each project references a different version of CSLA, the output goes to different folders, and each output library gets different version information so you can tell them apart.

Any help would really be appreciated! And yes, if everyone used the same versions, life would be sweet. But I have no power to enforce this, and I'm not real good at "hearding cats".

Thanks in advance!

Dan

Copyright (c) Marimer LLC