Contact

Technology

Feb 25, 2013

Know Your Tools – Visual Studio 2012 Edition

Thiago Silva

Thiago Silva

Default image background

Many of us would agree that developers are lazy. However, we do like to be productive. We are always looking for ways to improve our productivity while reducing the effort it takes to complete a task. I subscribe to the idea that we, as developers and technologists, should know our tools. It’s important to know what is in your toolbox, and how and when to use your tools, it will pay off in the future.

The Microsoft development ecosystem is rich and filled with the best tooling in the market. It includes some gems, which I have learned to love and use daily. As we wrap up our blog series on Visual Studio (VS) 2012 improvements, I would like to share with you my top tools, extensions, and tips for VS 2012 and .NET Development.

Quick Launch (CTRL + Q)

The new little textbox on the top right corner of VS 2012 (see Figure 1) is the gateway to many obscure features and menu options in VS. Quick Launch allows you to find most options in VS, and it likes to aggregate results in “Most Recently Used” items. It’s also a handy way to navigate through open documents, if your Tab Well is full beyond its capacity.

know your tools2
know your tools2

Figure 1: Quick Launch

__Keyboard Shortcuts

__This is not new, but it pains me to see a developer move his/her hand away from the keyboard to the mouse only to click on the “Build > Debug” menu option. Learn your basic keyboard shortcuts and they WILL make you a faster developer. Here are my favorites:

  • Build Solution – CTRL+SHIFT+B

  • Comment/Uncomment code – CTRL+K, C/U

  • “Smart Tag” menu (helps you create stubs for interface implementations, etc.) – CTRL+. (period)

  • Reference Highlight Navigation (click on a variable and VS highlights every usage in the scope, then you can traverse the results) – CTRL+SHIFT+UP/DOWN

  • Intellisense Completion vs. Suggestion Mode (Why: if you practice TDD, Intellisense can get in your way, so use Suggestion Mode) – CTRL+ALT+Space

Drive digital transformation with enterprise web and mobile applications through Microsoft Solutions

Explore Our Microsoft Consulting Services  →

__Extension Manager

__The Extension Manager is the gateway to plugins – it’s like browsing the App Store, but for VS. You can access it via the “Tools > Extensions and Updates” menu in VS. There are some great extensions for VS that I highly recommend, and would not go one day without them. However, be warned that extension overload might slow down your IDE. Pick the ones that best suit your needs without going overboard. Here are my favorites:

  • Productivity Power Tools – Historically, VS has shipped every 2-3 years. That’s a long time to go without pushing new features to the community. Therefore, the IDE team at Microsoft has used this little extension to “beta” test new features, which might make it into the next release of VS. Many good things have come from this extension and become first-class citizens, such as the Solution Navigator window and Quick Access (aka Quick Launch).

  • Web Essentials – If you build Websites in VS and write CSS, HTML, or JavaScript (and/or TypeScript), then this is a must have for you. Like the Productivity Power Tools, this extension is also developed by Microsoft – specifically the Web platform team…err…Mads Kristensen. As the gallery site says, Web Essentials “lets you perform common tasks much easier.” You get JSHint, CSS helpers, improved Intellisense, CoffeeScript and LESS support, ZenCoding, and much more.

  • Slow Cheetah – Have you ever wished you could add XML transformation files for your different builds, just like with web.config files? Wish no more, this extension does exactly that. Right-click on your app.config files in solution explorer and simply add transforms. This is simple and easy.

  • VS 2012 Color Theme Editor – Do you miss the blue days of VS 2010 or simply hate the sea of gray in the 2012 IDE? This extension allows you to change the colors of VS and create your own theme colors. Save your theme and share with the world!

  • Entity Framework Power Tools – If you are doing Code First (DbContext) with Entity Framework (EF), this tool helps you generate POCOs from existing databases without going the Database First route. This is handy if you want a quick start for working with existing/legacy databases and EF.

  • Nuget Package Manager – Just use it. In the near future, most parts of the ASP.NET Web stack will be delivered via Nuget. It is powered by a large gallery of open source and closed source libraries created by the community, and works similarly to Gems for Ruby. It automates the installation, configuration, removal, or upgrades for external library references and even source code. With Nuget, package authors can automate modifications to config files, add new folders and source code to the project, run PowerShell commandlets, and much more. On a side note, the Nuget project and the gallery were open source software projects initially developed at Microsoft, but now run by a non-profit OSS foundation.

  • JetBrains ReSharper, DevExpress CodeRush, or Telerik JustCode – Pick one and let the opinions flow in the comments. Most would agree that these productivity add-ons help us code better. All three options include awesome refactoring support, code analysis, snippets and mnemonics, unit test runners, and more. Telerik’s JustCode is the newest kid on the block and my current poison (I’ve used CodeRush in the past). It works in the background and doesn’t get in the way of the IDE, so I am enjoying it.

    NOTE: These three productivity add-ons are not free tools, but do offer free trials. They range from $200–250, and do provide academic and open source discounts.

T4MVC

If you are doing MVC with ASP.NET, you likely found the use of “magic strings” in your controllers and views to be disconcerting when creating links or returning action results. T4MVC is a Nuget package that leverages the T4 template Engine inside VS to generate strongly-typed constants and helpers to replace those “magic strings.” This helps catch broken links and action results at compile time, instead of at run time. It provides support for static content (images, JS, CSS, bundles) and areas (see Figure 2 below).

Figure 2: T4MVC Example

I would recommend also getting an extension that auto runs the T4MVC template after saving controllers, views, and static content. There are two extensions that do just that: AutoT4MVC and Chirpy (involves JS/CSS mashing and minification, in addition to, T4 running).

SSMS Tools Pack

This is not a VS tool, it’s a SQL Server Management Studio extension, but does some neat tricks! Its features include: an execution plan analyzer, snippets, query execution history, generation of insert statements from queries and tables (for migrating data via scripts), and more. This add-in offers a 30-day free demo license and costs $35 and up. It’s totally worth it if you live in SSMS.

Final Thoughts

Hopefully, you will put some of these tools in your tool belt and begin to reap the productivity benefits.

If you have other tools that you would like to share, please write a comment or reach out to us on Twitter @crederaMSFT. You can also check out other recent blogs on Visual Studio:

Conversation Icon

Contact Us

Ready to achieve your vision? We're here to help.

We'd love to start a conversation. Fill out the form and we'll connect you with the right person.

Searching for a new career?

View job openings