[tweetmeme source=”aabdulmoniem” only_single=false]

Older versions of VS like 2003 and 2005 were dedicated to only one framework. This was annoying because you have to use multiple versions of VS to develop multi-target applications which wasn’t very feasible at this time!

VS 2008 had come with a great feature called Multi-Target support which enables developers to develop multi-target applications on the same IDE. So, I can develop a program under .NET 2.0 and using the same VS to develop another one with .NET 3.5 or even convert the old one to .NET 3.5. Great feature, huh!

The problem was that all these versions will run on the same CLR, they are only different in class libraries! So, VS 2008 was primarily focused on filtering the different assemblies and project templates according the developer’s framework choice but everything else was working on the same CLR like compiling and debugging for example.

This wasn’t perfect because the intellisense of VS 2008 always showing the libraries of .NET 3.5 even if you are using .NET 2.0! This makes the chance that developers using .NET 2.0 adding code snippets which is supported only in .NET 3.5 by accident.

VS 2010 comes to the rescue. Now you can develop many programs under many different frameworks safely because the intellisense has been improved to show only what your framework supports.

Enough talking let’s see some screen shots. Just I will create two different web applications targeting different frameworks. The first one will target .NET 2.0:

And the second one will target .NET 4.0:

Now we have two web applications in our Solution Explorer:

Now let’s examine some differences, as we see DotNet2 project is the startup one so we will just run the page and open the integrated server information of VS 2010 to see the following:

But when we mark DotNet4 project as the startup one and run it you will see a different server information:

As you saw the difference is a clean separation between old CLR and new CLR. Good shot!

Let’s see another difference while working with VS Toolbox. We will just open the default page of the DotNet2 web application and open the VS ToolBox data tab to see what the supported controls are in ASP.NET 2.0:

And for the DotNet4 project, we will a different control list:

As we can see that VS 2010 now filters the tool box to show different controls according to the targeted .NET framework. Amazing!

Another one is, the property grid. Let’s see what is the difference. Drag a button on the default page for both projects and let’s see what the property grid will show. In DotNet2 project:

And for DotNet4 project:

As we can see, VS 2010 filters the properties which are supported in each framework correctly. Nice!

Last one, is the Intellisense which we have talked about firstly. Let’s try to write a statement like (Response.Re) in the two projects and let’s see what is the difference. In DotNet2 project:

And in DotNet4 project:

As we can see, VS 2010 filters the methods and properties which are supported in the targeted framework automatically for you to prevent to from accidentally writing something not appropriate.

A very good addition to this new version VS 2010.