Multi-Targeting Support (VS 2010 and .NET 4 Series)
page 5 of 8
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31059/ 122

Using VS 2010’s Multi-Targeting Support

To get a better understanding of how these new multi-targeting features work, let’s create a new ASP.NET Web Application using VS 2010.  To-do this we can use the “File->New Project” menu command to bring up the “New Project” dialog.  We’ll use the version drop-down at the top of the dialog to filter the project templates to only show those supported with .NET 2.0.  We’ll then create a new ASP.NET 2.0 web application project:

Figure 1

Because we are targeting .NET 2.0 with this project, VS 2010 will automatically filter the toolbox and markup intellisense to only allow us to use those controls that shipped in ASP.NET 2.0.  Unlike VS 2008, the VS 2010 property grid now automatically filters to only show those properties that were supported on the ASP.NET 2.0 button control: 

Figure 2

When writing code, VS 2010 will also now only show code intellisense for those types and methods/properties/events supported with .NET 2.0.  Below you can see intellisense for the ASP.NET 2.0 “Response” object when we type “Response.Re”:

Figure 3

When we run the application using the built-in VS web-server, it will run using the ASP.NET 2.0 version (and the VS 2010 debugger will debug the CLR 2.0 process):

Figure 4


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-06 4:43:18 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search