Targetting a class library for both 3.5 and 2.0



I have a rather big class library solution with lots of projects.

Some of these projects I'd like to include .NET 3.5 things in, but only when I'm targetting 3.5.

Basically, I'd like to be able to target 3.5 and rebuild, getting new things into the new dll's for 3.5, and also be able to target 2.0 and rebuild, to get files for 2.0.

What is the best way to do this? The "best" way I've come up with so far is to make a new solution file and new project files with a named definition and use #if..#endif to make files, or just not include the 3.5 files in the 2.0 projects, but this seems like a rather big maintenance nightmare.

I'd like to have one solution and all of the projects once, and include files that may or may not produce any compiled code depending on the target.

Or am I way off target here? Any thoughts would be welcome.

--
Lasse Vågsæther Karlsen
mailto:lasse@xxxxxxxxxxx
.



Relevant Pages

  • Re: Gaining control of build dependency...
    ... There are numerous other reasons the target should get updated, ... descrip.mms and descrip2.mms in the command line, ... MMS file that is included? ... a rebuild of the target executable. ...
    (comp.os.vms)
  • RE: FreeBSD Security Advisory FreeBSD-SA-05:01.telnet
    ... the security advisories just have you rebuild the ... > For historical reasons, the telnet build is rather messy: ... there isn't a cushy Makefile somewhere with a target to ...
    (FreeBSD-Security)
  • Re: Slow droptarget
    ... The target bank isn't difficult to rebuild. ... and remove 4 screw that hold the mech to the pf. ... slowly all the way down (sometimes it needs another hit to go down all ...
    (rec.games.pinball)
  • Re: Whats in kbuild.git for 2.6.19
    ... It tells why a target got ... kbuild rebuild that much after changing just a tine CONFIG_ ... for Documentation/kbuild/modules.txt kbuild: linguistic fixes for ...
    (Linux-Kernel)