Multitarget Projects
Have you noticed that previous releases of Visual Studio only supported one version of the .NET Framework? For years, my desktop was swarming with shortcuts to different versions of Visual Studio based on the projects I maintained at the time: Visual Studio 2002 for .NET Framework 1.0 applications, Visual Studio 2003 for .NET Framework 1.1, and Visual Studio 2005 for .NET Framework 2.0 applications. Finally, Visual Studio 2008 introduces a cool feature called "multitargeting" that lets us create applications for specific versions of the .NET Framework.
Multitargeting brings two main benefits to the table:
- You no longer need to install two or more different versions of Visual Studio to deal with the various clients and projects.
- You are no longer subliminally invited to upgrade to the next, super-cool version of .NET because of the new, super-cool time-saving features of the next Visual Studio. One IDE fits all .NET Frameworks, you could say. All frameworks? Well, not exactly.
Multitargeting in Visual Studio 2008 starts with .NET 2.0 (Figure 1) and should continue for most of the foreseeable future versions. Significant changes in the Common Language Runtime (CLR) that occurred between .NET 1.1 and 2.0 made it impossible to extend multitargeting to just any existing versions of the Framework. The nice thing about multitargeting is that any piece of the Visual Studio 2008 UI adapts to the target platform. The toolbox of controls, compiler settings, the list of assemblies to reference, IntelliSense on objects, and, of course, binaries are all specific to the selected platform.
The target platform is not a definitive choice. At any moment, you can upgrade or downgrade to any of the supported targets. You do this from the property pages of the project in the Solution Explorer (Figure 2).
Should you install Visual Studio 2008 if you're mostly maintaining existing .NET Framework 2.0 applications? Clearly, the big news about Visual Studio 2008 is the support it offers for 3.x .NET applications. However, even from a platform-agnostic perspective, there's something it offersan improved set of facilities with a particular attention to web developers. JavaScript debugger, CSS, master pages designer, and LINQ helper tools are all features available independently from the target platform.