Channels ▼
RSS

Design

Inside Visual Studio 2008

Source Code Accompanies This Article. Download It Now.


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.

[Click image to view at full size]

Figure 1: Choosing a target platform for a Visual Studio 2008 project.

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).

[Click image to view at full size]

Figure 2: Upgrade the target .NET of an existing project.

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 offers—an 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.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video