Did you know… Visual Studio 2008 Supports multi-targeting of the .NET Framework? – #160


Since today is the launch, I had to pick something huge about Visual Studio 2008.

Scott Guthrie has an excellent write-up on Multi-Targeting Support that I dare not even attempt to summarize on this blog, but I’ll repost Scott’s description of what’s multi-targeting:

With the past few releases of Visual Studio, each Visual Studio release only supported a specific version of the .NET Framework.  For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.

One of the big changes we are making starting with the VS 2008 release is to support what we call "Multi-Targeting" – which means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to start taking advantage of the new features Visual Studio provides without having to always upgrade their existing projects and deployed applications to use a new version of the .NET Framework library.   <read more>

But as tradition dictates, i must include a picture.  Since Scott did his write-up in C#, i’ll take a picture using VB.  And apparently Scott knows about tip #155.  =)

Technorati Tags: VS2008Tip

Comments (10)

  1. ccatto says:

    Hey Now Sara,

    This is a good one to post for everyone even if it’s a refresher.

    Thx,

    Catto

  2. derek says:

    when I first heard about "multi-targeting" I was very excited.  too bad it doesn’t support the 1.1 framework.  "multi-targeting" is a misleading term when you don’t support all of the versions.  I guess I’m stuck with vs2003.

  3. Eric Willeke says:

    This is a nice capability. Unfortunately, some of the designers and code generators in 2008 output code that relies on classes only available in 3.5. This makes the feature of limited usefulness in many situations.

  4. S A says:

    I am not sure I understand how this is supposed to work. I can see that VS 2008 can compile using the .NET 2.0 compilers as well as the later ones.

    However, every time I open a project from VS 2005 in VS 2008, I am asked to upgrade. If I don’t upgrade, it doesn’t open.

    Am I missing some step or configuration setting?

  5. saraford says:

    @derek:  Check out MSBee – an add-on to MSBuild that targets .NET 1.1.  http://www.codeplex.com/MSBee

    @S A:  This is expected behavior because the solution files from VS2005 need to be modified to work in VS2008.

  6. Kyralessa says:

    Can you point us to a place that talks about multitargeting in more detail?  I have a client with .NET 2.0 (without SP1), and when I send him a .NET 2.0 project built with VS 2008, it doesn’t work; but if I build the same project in VS 2005, it works fine for him.  Clearly multitargeting doesn’t work seamlessly in all cases.  Have any Microsoft bloggers discussed what can cause this?

  7. S A says:

    Sara:

    Thanks for the reply.

    What did ScottGu mean by "without always having to upgrade their existing projects"? Was he just talking about code and not the .sln and .prj files?

    S A.

  8. wsyeager36@msn.com says:

    According to the above, whenever I open a project compiled with the 2.0 framework, it would ask me to convert it; otherwise don’t upgrade. However, with a project, it is forcing me to upgrade it to a VS2008 format.

    Will this cause any problems in this multi-developer environment?

    In addition, I also wanted to point out that our Visual Source Safe database contains project files. If I convert a VS 2005 project to be used in VS 2008, won’t the project file be updated (to VS 2008 format)? Hence, the file will be checked back into VSS with this updated VS 2008 format. Nobody else in my development team would be able to edit the project with VS 2005.

    The solution files are maintainted on our local computer. This won’t present a problem, but it appears that the project files will.

    Is there any way to simplify this confusion?

Skip to main content