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
Anonymous
February 27, 2008
PingBack from http://msdnrss.thecoderblogs.com/2008/02/27/did-you-know-visual-studio-2008-supports-multi-targeting-of-the-net-framework-160/Anonymous
February 27, 2008
Hey Now Sara, This is a good one to post for everyone even if it's a refresher. Thx, CattoAnonymous
February 27, 2008
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.Anonymous
February 27, 2008
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.Anonymous
February 27, 2008
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?Anonymous
February 27, 2008
@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.Anonymous
February 28, 2008
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?Anonymous
February 29, 2008
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.Anonymous
March 24, 2008
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?Anonymous
December 25, 2008
本篇包括tip151-tip160http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-16.html#151、意外...