I did a session at DevWeek on ASP.NET 4.0 and Visual Studio 2010 and I’ll be doing a similar session on Saturday at WebDD and again in Glasgow on the 2nd of May at Developer Day Scotland. I thought it might be worth distilling some of the content into a few blog posts. Let’s start with VS2010 enhancements for ASP.NET Developers.
Not specific to ASP.NET but a benefit you’ll still enjoy is the extension of VS2008’s multi-targeting capabilities allowing you to target ASP.NET 2.0, 3.5 or 4.0 applications from the VS2010 IDE. That means you can benefit from all the IDE enhancements even when building or maintaining earlier .NET Fx apps.
Yes, at last we have snippets (and “surround with”) in the web designer. That means you can either right-click and select a snippet or type the shortcut (such as “tb” for textbox”) and TAB to get the expansion.
eg xhtml11 => <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and of course it’s extensible so you can create your own, share them with others etc. They really take a lot typing out of it.
Another nice thing about snippets is they have some “smarts” about them. So, for example, if I add a required field validator snippet (as below) it will look for a suitable predecessor that I might want to validate and automatically the ControlToValidate property appropriately.
VS2010 will use MSDeploy to create web packages comprising your application, metadata, IIS settings, SQL Server schema and data, certificates and other dependencies. To read more about MSDeploy I’d suggest checking out the team blog.
One very cool deployment feature in VS2010 is web.config transformations. Each build configuration is given a unique transformation file to allow the web.config to be tweaked for different build configurations. eg below I have just Debug and Release configurations. The Web.Release.config file contains a set of transformations that will be applied to the web.config during deployment. In my case I have 2 transforms, one replaces the connection string with my production connection string and the other removes the debug attribute from the compilation element thus ensuring my configuration is correct for production.
If I add a new build configuration as below:
I get a corresponding web.config transform file which I can opt to base on any existing transform file (or empty).
That’s a brief overview of some of the new VS2010 features for web developers. The whitepaper “ASP.NET 4.0 and Visual Studio 2010 Web Development Beta 1 Overview” has more details on some of these features. For a good introduction to deployment in VS2010 I’d recommend How does Web Deployment with VS10 and MSDeploy Work?
PingBack from http://blogs.msdn.com/mikeormond/archive/2009/04/16/visual-studio-2010-enhancements-for-asp-net.aspx
Along side the ASP.NET 4.0 and Visual Studio 2010 Web Development Beta 1 Overview comes the Visual Studio
Thank you for submitting this cool story - Trackback from DotNetShoutout
The web.config transforms are absolutely brilliant. Is there any chance that the app.config file for client apps could also get the same feature?
If anyone's interested in this I've raised a request on Connect for this:
Thank you for submitting this cool story - Trackback from progg.ru
Interesting Finds: April 17, 2009
Visual Studio 2010 Enhancements For Asp.Net Mike Ormond's publish a great post on VS2010 and the
Following on from my post on VS2010 Enhancements for ASP.NET I thought I’d spend a little time describing