So soon after Visual Studio 2012, the latest version of Visual Studio isn’t what most developers are viewing as a major update. Nonetheless, Visual Studio 2013 has rolled out extensive improvements, changes and updates to Microsoft’s IDE, particularly in terms of code editor productivity features, language capability improvements, and development in the Windows Store and Windows Azure.
Visual Studio 2013 is all about creating a more connected experience for developers, from synchronizing account settings across different environments, to preloading accounts with code through Visual Studio Online, formerly known as Team Foundation Service. The majority of Visual Studio 2013’s new features serve that end of connecting, streamlining and simplifying the developer experience.
(Related: The Visual Studio 2013 Buyers Guide)
Top-billed features such as CodeLens, Peek Definition and Browser Link only scratch the surface of the improvements and updates jammed into various nooks and crannies of Visual Studio 2013, so we’re hitting the highlights of the most important new additions.
Peering through the CodeLens
One of the biggest productivity features added in Visual Studio 2013 is CodeLens, which augments the coding experience with a real-time data display. By providing references, functions, counts and other tracking information expanded in-line with greater detail, developers have no reason to waste time outside the code editor.
“It’s more or less what we call a ‘head-up display,’ right in your IDE,” said Microsoft product manager Aaron Bjork. “So if you’re looking at some piece of code you’ve got, some method or some function in your code, you get a little overlay right at the top of that method. It tells you who was the last person to edit this piece of code or this method. It’s this nice little head-up display that for every method you see it, and when you click on it, it just in-line expands to give you a whole bunch of detail, so you can navigate directly to a calling method. You can run tests directly from there, you can open the work item that was associated with this last change set, and it brings all that information around the code that you traditionally want but when you need it, it’s never at your fingertips. We’ve built it into the IDE in such a way that it’s right at your fingertips.”
The one big catch to CodeLens: It’s only available in the Ultimate edition. It also doesn’t track code references in XAML or ASPX files, so you might end up with an incorrect count. For those with Ultimate access, though, CodeLens is a heads-up display providing reference counts for simple code and details for teams on more complex, long-lived code. It’s not a flashy feature, but CodeLens shines when displaying links to TFS Work Items and code presence information for developers.
ASP.NET’s new identity
ASP.NET has a laundry list of new features for Visual Studio 2013, not the least of which is a new identity system otherwise known as One ASP.NET, which preserves the old options of storing credentials in a SQL database while adding support for testability, social media authentication and claims-based authentication.
When creating a new ASP.NET project, choosing Web Forms no longer stops developers from leveraging MVC features. Additional folders and references can be added regardless of template. So if a developer needs the SEO control of MVC Search Engine Optimization, but doesn’t need the same control for ancillary pages, they can build that with Web Forms without losing the MVC features they’re dependent upon.
Visual Studio 2013 also adds support for Automatic Binding Redirection for assemblies. This gives an ASP.NET project that’s targeting a specific version of the .NET Framework an automatic redirect if it still depends on another type definition such as XML. While the feature has been available since .NET 2.0, in .NET 4.5.1 it’s done automatically when the compiler detects it for both Windows and Web applications.
Visual Studio 2013 ships with .NET Framework version 4.5.1, but you can target any version of the .NET Framework.
Sizing up TypeScript and C++
Visual Studio 2013 adds features such as auto complete for closing braces like parentheses, curly braces and square brackets. Other features developers in C# and VB.NET take for granted are better code formatting, improvements to Find All References, and a resizable properties window. Many others would have undoubtedly evolved if C++ had been maintained over time the same way as C# and VB.NET.
There are also enhancements that make C++ better for Windows Store development, and the addition of a REST SDK. As with past versions of Visual Studio, there are a bunch of other updates that are very niche and too numerous to list, but C++ already has a reputation for the best language if speed is your primary need, and it looks like Microsoft is going to maintain that aspect.
Browser Link hits automatic refresh
The days of refreshing code manually in each browser are over. Another Visual Studio 2013 feature called Browser Link detects all browsers viewing code as CSS or HTML5 changes are being made. Within the IDE, the system also allows alt-tab switching through browsers to make sure the code is rendering properly.
“What Browser Link does is, you’re a Web developer, and you’re writing a lot of HTML or CSS,” Bjork said. “What you end up doing is you end up looking at the finished product in a lot of different browsers. You might have Firefox up, you might have Chrome up and IE, and as you’re making changes, you’re refreshing all those different browsers to make sure that the code you’re writing is rendering properly.
“We actually automatically refresh those browsers for you. So instead of having to write a bunch of code, save it, and do a traditional gesture like ‘view in browser,’ or go to all your other browsers and refresh them, those things are being refreshed for you.”
Stay in the zone with Peek Definition
CodeLens helps keep developers focused in the browser, but Peek Definition may be an even more substantial new feature for fostering productivity in Visual Studio 2013. Instead of the tedious process of right-clicking a method or procedure and scrolling to Go to Definition, Peek Definition eliminates the distraction by opening an editing window for the procedure in the code editor.
Barry Gervin, Microsoft regional director and director of solutions delivery for Navantis, talked about how Peek Definition is a revolutionary way to keeps developers productive, on task and in the zone.
“The new Peek Definition gives me that next layer down while encouraging me to stay focused where I am,” he said. “Historically, when spelunking code, I would quickly get myself into trouble with ‘Go to Definition’—drilling further and further, opening up tab after tab until I forget where I was.”
Team Foundation Service, meet Visual Studio Online
Gervin also talked about Visual Studio 2013’s marked improvement in enterprise capabilities as part of Team Foundation Service’s rebranding as Visual Studio Online, a service Microsoft vice president S. Somasegar described as “a collection of developer services that runs on Windows Azure and extends the development experience in the cloud.”
New agile portfolio-management capabilities, visual call stack debugging with annotations, and an undocking option for embedded pending changes in Team Explorer were only a few of the TFS features Gervin pointed out that simplify enterprise development in Visual Studio.
“It has new features that have a tangible impact on the day-to-day life of my team as they are building enterprise applications,” he said. “Although I like the idea of Team Rooms for having threaded discussions within Team System, I am most excited about being able to comment and have a discussion attached contextually to a change set. This moves a lot of what we often do with e-mail across distributed teams, right into TFS and next to the code.”
Gervin added, “From a team collaboration perspective, we are excited to leverage the new interactive discussion capabilities in TFS and VS 2013.”
Installing Visual Studio Online hosted on Windows Azure, as opposed to a traditional client machine install, is now a viable option. Microsoft offers a full Visual Studio 2013 install as a virtual machine available via the gallery, and thanks to changes in the charge model that make virtual machines free when they are turned off, you only have to pay for the time you use.
Best of the rest
Going forward, Microsoft’s Bjork said users could expect advances in the DevOps capabilities, built around Microsoft’s acquisition of InRelease this past summer. He added that developers would see improvements in IntelliSense for XAML.
“We’re seeing XAML being used in all kinds of different apps across all the different Microsoft platforms, whether it’s [Windows] Phone, Silverlight, Windows Store or Windows apps, and we’ve got some real good IntelliSense improvements inside the XAML editor. It’s hard to talk about without showing you, but a lot of nice improvements are there as well.”
Bjork also elaborated on new tools in the Windows Store, such as CPU sampling and code diagnostic tools to measure how a sample of running code is affecting energy consumption and battery life. The tools allow developers to pay closer attention to the various factors that can influence the battery life of Windows Store apps running on tablets and other mobile devices.
Finally, we’ve got a few odds and ends. MSBuild is now included in Visual Studio as part of the .NET framework, and Windows Azure SDK 2.2 is the first release to support Visual Studio 2013, which also adds Edit and Continue support for the new wave of 64-bit applications. While CodeLens is only available in the Ultimate edition, other Ultimate-level features like Architecture Explorer, Code Review and PowerPoint Storyboarding are available in the Professional Edition.