Coding Tips & Tricks


Home > Visual Studio 2012

Visual Studio 2012 - A week in perspective

I am one of the lucky ones. Fortunately my company gives us a MSDN subscription and this goes a long way toward keeping up with the latest Microsoft Software. I have been eagerly awaiting the release of Microsoft Visual Studio 2012 which came out last week.

Visual Studio 2012 Logo

I was a little apprehensive about installing Visual Studio 2012 and running projects in Visual Studio 2010 side-by-side as I work in a team. Fortunately, the latest version offers a compatibility feature that allows you to run 2010 projects in 2012 and vice versa. It will need to add some migration settings to the project, but I have tested this and you can still open the project in Visual Studio 2010 without any problems.

Installing

After downloading the Web Installer, I began to install the software. I was very impressed with the overall install time. It clocked in at about 30 minutes and only one restart - pretty impressive considering how long it took to install VS 2010 and the SP1 service pack for it! I am running Visual Studio 2012 on Windows 7 and the first thing I noticed on the installer screen is the shiny new "Metro" style layout.

Visual Studio 2012 Install

Once the installation was complete and Visual Studio started up for the first time, I was presented with the new grey-ish theme.

Visual Studio 2012 Layout

Not a bad layout at all. It takes some getting used to, but I was thoroughly impressed with the speed with which solution files and projects opened. It seems as if the Visual Studio team have placed a lot of emphasis on the speed in Visual Studio 2012.

Asynchronous Code

Visual Studio 2012 is also packed with plenty of new features. I have been quite keen to start messing around with the new Asynchronous features that have been introduced with .Net 4.5 Framework. The async CTP was cool, but it just didn't quite feel right until the correct version was released. Now writing asynchronous tasks is super easy using the System.Threading.Tasks namespace.

For more information on the new asynchronous methods in C#, check out this link.

AntiXSS

By default, the AntiXSS Library is included with Visual Studio 2012. In order to use it in your project, you simply need to add the following to your Web.config file.

For more information on the AntiXss Library, check out the following link.

ASP.net MVC 4 and Webforms Updates

There have been a load of cool new features introduced, including the new Bundling and Minification feature which sits under the System.Web.Optimization namespace. It allows you to automatically minify and bundle your CSS and JavaScript files and works in both MVC and Webforms. MVC 4 is also included by default, which means you get all the shiny new features of this latest release of ASP.net MVC.

Nuget by default

Visual Studio 2012 ships with Nuget by default, which makes getting all the latest libraries in your application the click of a button away.

Add References Visual Studio 2012

The Reference Manager also has some noticeable changes:

Visual Studio 2012 Reference Manager

Editor Updates

The JavaScript, HTML and CSS editors in Visual Studio 2012 are completely new and they greatly improve the overall development experience.

Visual Studio 2012 CSS Editor

Publishing

There are slightly updated publishing tools with the latest release. They allow you to save different versions of your release, which can be handy if you frequently deploy to a dev and live environment.

Publish Settings Visual Studio 2012

It also includes a totally new way of deploying your Windows Azure projects. No longer do you need a separate Azure project just to publish your application. You can easily do this as if it were a standard deploy to an FTP location

IIS express & ASP.net Performance

The lastest version of IIS 8 ships with Visual Studio 2012 by default. I have been using IIS express for a while now in Visual Studio 2010 as a separate download, and it performs really well. You get all the features of a fully blown IIS, without needing to deploy to your local IIS every time.

The ASP.net team have also focussed on the speed and performance of ASP.net websites. These changes include how much memory a website occupies and also the time it takes to launch a web server process for the site when the site assemblies are no longer in memory. For more information, check out this link.

Summary

Overall I think that this latest release of Visual Studio 2012 is awesome. It feels a lot faster, and every click seems to respond instantly. The colour scheme is a little grey, but I guess this is the way that the overall "Metro" theme is moving. This is a great product and an exciting time to be a .Net developer!








Comments

Gareth Oates - 8/21/2012
Have you noticed any compatibility errors when dealing with .NET 4.0 solutions? I've heard that there are some breaking changes with .NET 4.5 which make certain aspects of .NET 4.0 applications not work anymore...

Dean Hume - 8/21/2012
@Gareth -No I havent noticed any compatibility errors yet. VS 2012 seems to handle the transition between the two project types quite well. As long as you dont explicity update your project to use .NET 4.5 (in the project properties), you can continue to work in both 2010 and 2012. Hope it works out

Luke Stock - 8/22/2012
Hey Deano, Have you tried the "Dark" colour theme? (Tools > Options > Environments) I much prefer it. I've also been impressed with the improvements to the Team Explorer window. I have found the 'My Favourite Builds' feature particularly useful. Also the code comparison tool is much improved.

Dean Hume - 8/22/2012
@Luke Hey! No, not yet - Ill definitely check that out. Are you using it where you work?

Luke Stock - 8/29/2012
@Dean yep, started using it a couple of weeks ago. It's so much better!

Gary - 9/17/2012
Great post, very informative!

Gary Woodfine - 3/20/2013
I have to agree with Luke. I much prefer the dark theme. I always used to set my coding window to obsidan dark theme anyway in previous version of VS, but now that you get a dark theme out the box is awesome


Add your comment

300 Characters left


Please fill this in to confirm that you are human