Visual Studio Toolbox
20 New Tools and Extensions for Visual Studio 2015
We've gathered together the newest project templates, security tools and generally useful extensions for Visual Studio.
- By Terrence Dorsey
I can't think of a work-related piece of software that has the number and breadth of community-sourced tools and extensions we enjoy for Visual Studio. It's astonishing every time I sit down to write this column how many new extensions have been released or updated. This month I've pulled together a round-up of new, free tools available from the Visual Studio Gallery. From project templates to deployment tools and every step of the development lifecycle in between, there's something here that help you code better, ship better, or support your customers better.
Genesys Framework Quick-Start for MVC is an open source framework for building ASP.NET MVC, WebAPI and cross-platform Universal apps. You can use either existing SQL Server table structures as the basis for building an application or upgrade an app one object for page at a time. Genesys includes built-in Entity Framework and DAO project stubs, as well as support for Xamarin applications. See the Genesys Framework web site and GenesysSource Foundation GitHub repository for more information.
While the Genesys software is free right now, the "Important Disclaimer: All software and services provided are currently in limited Preview" note on the web site makes it seem like there may be commercial offerings down the road, so evaluate with that in mind.
MvvmCross Plugin Template for Visual Studio, by Ishai Hachlili, is a project template for building Android, iOS, Windows Common (Windows and Windows Phone 8.1) and UWP application plug-ins with MvvmCross, a .NET Framework-based Model-View-ViewModel pattern framework for building cross-platform applications.
This project is based on, and adds useful development templates to use along with, Jim Bennett's MvvmCross for Visual Studio collection of MvvmCross project templates. Bennett also provides a MvvmCross Template Pack add-in for Mono Develop and Xamarin Studio, by the way, and I covered some additional MvvmCross tools in my October 2016 Templates and Extensions for Xamarin & Mono column for Visual Studio Magazine.
Mirza Merdovic's OWIN Web API Starter Template provides a basic project template for, as you might guess, building ASP.NET Web API applications that support OWIN — Open Web Interface for .NET. The template is really adding any functionality that you wouldn't already get with Web API applications, but does provide basic, lightweight boilerplate to configure features such as cross-origin resource sharing (CORS), bad route handling, exception handling and logging and Autofac dependency injection containers. See the WebApiStartTemplate Wiki on GitHub for details and help.
Windows Service Plus, by Emerson Brito, a project template for building Windows service and Mono service applications with the Topshelf service hosting framework. Though it does more, the key feature of Topshelf is that it enables you to build a service as a console app to simplify testing and debugging, then build and install the service directly from the same code. Windows Service Plus also uses Apache log4net as its logging framework and Ninject for dependency injection. See the Windows-Service-Plus repository on GitHub for additional details and code examples.
Build, Test & Deploy
The recently released Cake for Visual Studio extension adds integrations for the Cake build automation system and task runner right into your development environment. Cake is a cross-platform build system using the Roslyn and Mono compiler and a C#-based domain-specific language (DSL) for writing custom build scripts. The Cake extension adds Visual Studio item and project templates for Cake configuration, automatic task runner triggering, and a Task Runner Explorer.
Publish Notifier, by Dalibor Mesarić, is a simple extension (and a couple service integrations) that lets you send messages to your colleagues on Slack or HipChat when you deploy a web application through Visual Studio's one-click Publish command. It's an open source project, and you'll find the source code, documentation, web hook configurations and more in the PublishNotifier GitHub repository.
Speaking of deploying web applications, Kyle Herzog's Web Deploy Parameters Toolkit makes it really easy to generate your Parameters.xml from from Web.Config and to create custom SetParameters[Environment].xml files and deployment parameters based on your Parameters.xml code. You can nest deployment parameter files, automatically import missing parameters, and more.
The Conveyor extension for Visual Studio, by Keyoti, lets you configure access URLs to your web application running as localhost or on a development machine so you can test on other machines, Android devices, and iOS devices. When the Conveyor extension is installed, it provides a custom remote URL whenever you run a web application project. Simple as that. Configuration, firewall and troubleshooting details are available on the Conveyor web site.
Ngrok Extensions, by David Prothero, is a similar tool, letting you set up secure tunnels to a local server behind NAT or a firewall using ngrok. The extension does not include ngrok -- you'll have to download that separately or install via Chocolatey package. Once configured, however, you get one-click ability to start a secure tunnel from your local deployment for testing, shared development environments, live client demonstrations and more.
Writing secure applications doesn't have to be difficult. With extensions like Roslyn Security Guard, by Philippe Arteau, you can configure Visual Studio to automatically run security audits on your .NET Framework applications at build time. Roslyn Security Guard current detects 18 vulnerability patterns with over 35 different signatures. For more details or to contribute audit patterns, head over to the roslyn-security-guard GitHub repository. I'd suggest contributing to the tutorial if you can!
Vulnerabilities in your own code are one problem. Vulnerabilities in dependencies are another altogether. Package Security Alerts, by Mads Kristensen, checks for known security issues with the npm and Bower packages included in your projects and provides mitigation suggestions. At the rate packages get updated and new vulnerabilities are discovered, I'd run Package Security Alerts every time I built my project. Seriously.
Visual Studio Enhancements
How about a couple simple extensions to customize and automate your Visual Studio environment?
Let's start with the Hot Keys - Keyboard Shortcuts extension, by Microsoft's Justin Clareburt. Unlike some general-purpose keyboard macro applications that you'd use to customize your key mappings, Hot Keys simply tries to replication key mappings from other popular development tools and IDEs onto Visual Studio 2015. Currently it provides JetBrains IntelliJ C# and ReSharper IDEA and C# mappings to equivalent features in Visual Studio. Where there aren't equivalent commands, Hot Keys uses Visual C# 2005 mappings, plus some other handy customizations and support for Clareburt's Hot Commands for Visual Studio extension.
Data Juggler's Solution Shipper is a simple, open source application that creates stripped down copies of Visual Studio solutions by removing bin, obj or packages folders, along with any user configured folders that may hold non-essential project files. Solution Shipper is perfect for removing sensitive data or copying just the important project files to a USB key.
Enum Case Generator, by Simon Mourier, reads the values in an enum in your C# code and creates a corresponding switch statement for the enum values. If you add values to the enum, Enum Case Generator adds just the additional switch statement cases needed. So simple, yet so handy!
IdeX is an interesting new extension that enables your running application to set up interprocess client-server communication with Visual Studio for data exchange using a simple string-based syntax. It's a pretty interesting concept. The software even includes an IdeX Lab client simulator app to help you experiment with the software's syntax and messaging process. You'll find more information and a brief tutorial in the IdeX GitHub repository.
Visual Studio Time Savers, by Yann Duran, provides simple toolbar-accessible tools that let you accomplish tasks like inserting a GUID, canceling a build, restart Visual Studio, access path variables and logs, and much more. You might notice a strong resemblance to Duran's Luminous Essentials for VS. Time Savers is the same project, but now open sourced, and future development will happen in the Time Savers extension.
Michael Reukauff's CommentCop extension is StyleCop for your XML comments. This is new enough that it currently only checks for missing comments, but keep an eye on it for more features in the future.
Finally, keeping with the comment thread, Klaus Hartke's Reflow extension simply re-formats selected text in Visual Studio to make it left-justified, joining or breaking lines to keep them 80 characters long or less. Very old school. I approve.