I intended to post about this a couple of months ago and am finally getting around to it. Good news though - my un-posted solution was already in the pipeline, it seems, and multi-targeting is now feature complete.
Supported multi targeting in VS 2008 (Orcas) is no small thing: it's huge to customers with a mature or large codebase.
Jomo Fisher's post was out there as early as Widbey Beta 1. Though others provided additional insight over time we've been using a modified version of Jomo's targets file since Widbey Beta 2 at a long-term client to target the .NET Framework 1.1: yes - unsupported multi-targeting in Widbey. Since, we've leveraged the targets file at a number of other clients: in particular where Microsoft Dynamics CRM 3.0 is used as callouts and workflow components (CRM business logic extensions) are required to be built to the .NET Framework 1.1. There were certainly gaps with the approach like ASP.NET yuck but for middle tier components it worked fine in most cases.
Widbey "multi-targeting" allowed this particular client to uptake VS 2K5 tools and the .NET Framework 2.0 early but to cross-compile down to the .NET 1.1 when needed. This was significant - we had a large development team: MCS consultants (including Statera resources), body shop contractors and FTEs. We implemented TFS in earnest (at Widbey Beta 2 as well) including continuous integration (product, unit test and package and deployment team builds). It allowed us to almost entirely eliminate VS 2003 projects from regular team builds as we had little or no need for 1.1 except for "thin" (ahem) callout and workflow components that ultimately called 2.0 services.
So Scott Guthrie answers the next question in a post from June (like it or not - it's reasonable):
What about .NET 1.0 and 1.1?
Unfortunately the VS 2008 multi-targeting support only works with .NET 2.0, .NET 3.0 and .NET 3.5 - and not against older versions of the framework. The reason for this is that there were significant CLR engine changes between .NET 1.x and 2.x that make debugging very difficult to support. In the end the costing of the work to support that was so large and impacted so many parts of Visual Studio that we weren't able to add 1.1 support in this release.
VS 2008 does run side-by-side, though, with VS 2005, VS 2003, and VS 2002. So it is definitely possible to continue targeting .NET 1.1 projects using VS 2003 on the same machine as VS 2008.
I'd add one other consideration here and it may be tough to swallow: VS 2003 is not supported (but has been reported to work) on Vista. Ouch! Bottom line - get your clients to move along.
Beta 2 - "Multi-targeting is Feature Complete"
So as I now have Beta 2 up and running I intended to follow-up on this post and get it out there. I, again, opened the Community Server 2007 SDK solution to see if there was any change (my unpublished draft is below for context). Hey - the conversion was different: it obviously upgraded the solution and project files but it didn't change the target framework as it did with Beta 1. I like it - this'll work!
Our clients will now be able to use the new toolset and features and be assured that existing projects won't incur unexpected test burden as a result. In addition, they'll be able to use the tool to upgrade their existing projects and target netfx3.x as they get approval, as needed and when they have bandwidth (phased not forced). Solid!
Below is my original draft (couple months old):
So to test multi-targeting I attempted to open the Community Server 2007 SDK solution (Beta 1).
I 'd assert that multi-targeting would be most often used when opening and maintaining existing solutions (created w/ VS 2K5). I mean if you're using Orcas to create new projects you're likely to target the latest .NET framework - right(?). I know - I know: this won't always be the case, but come on - 80-20 or 50-50 at least. As consultants we're almost always using new (even Beta) technologies and need all the help we can get to "grease the wheels" for adoption.
When the conversion wizard completed I had a considerable effort ahead to get things back to working - it not only upgraded the solution and projects but each of the projects target framework - hmm. Ultimately, I was forced to make a decision to either make it all work with a new netfx version or go into each project and re-target 2.0. The later approach requires changes to references and undoing the code changes (backups - you say). As this was an academic endeavor - fine. However, clients would, and certainly have, delayed uptake as a result of forced test burden on larger projects.
Simple - during the conversion wizard prompt the user to keep the same target or to upgrade.
Technorati tags: .NET Framework, Beta Review, Community Server, Tools, Visual Studio