Visual Studio Toolbox
22 New Tools and Extensions for Visual Studio 2017
Summer is coming to a close, and there's a new class of Visual Studio tools and extensions available specifically for the latest release, Visual Studio 2017.
- By Terrence Dorsey
The extensibility of Visual Studio and the huge community of developers sharing tools and extensions means there's always something new to try or a better solution to a daily coding irritation. Here's a roundup of the latest contributions to the Visual Studio Marketplace specifically for Visual Studio 2017. The vast majority of these tools and extensions are free and created by developers just like you.
Having access to a command-line interpreter during application development can be a lifesaver, whether you're running commands, using command-line Git, deploying builds, or even managing remote servers and services. Of course you can Alt+Tab to a separate command-prompt window, but why bother if you can have the same sudo powers right in Visual Studio 2017....
Whack Whack Terminal, by Daniel Griffen, is a new extension that provides a terminal emulator as a tab in Visual Studio 2017 (see Figure 1). The "Whack Whack" name comes from the default keystrokes to enable the terminal: Ctrl+\, Ctrl+\. As I'm writing this, the available release defaults to a PowerShell command prompt. However, once you're in the terminal, you can employ Windows command prompts, PowerShell cmdlets, or invoke a Windows Subsystem for Linux (WSL) Bash prompt. Settings to configure the default interpreter are scheduled for an upcoming release.
BuiltinCmd, by Lky Tal, provides only Windows command prompt support in a Visual Studio tab. However, the developer has been updating regularly and the extension supports Visual Studio 2013 through 2017. PowerShell support is on the roadmap!
Now, if you want to incorporate support for terminal sessions into your application rather than your IDE, there are a couple choices available.
ComponentPro offers 30-day trial editions for its Telnet Component/Control and .NET SSH Shell Telnet, Terminal Control (which includes the Telnet control) products. Both let you incorporate SSH and Telnet commands or terminal sessions into applications built with the .NET Framework, C#, Visual Basic .NET, ASP.NET and WinForms. See the ComponentPro Web site for product details, documentation and license pricing.
Templates and extensions that get your projects rolling quickly and efficiently are always welcome, and I've got a few new ones starting with Simplify.Web.Templates, a set of templates for building Web applications with Simplify.Web, MVC and OWIN in Visual Studio 2017. A previous version of the Simplify.Web.Templates is also available for Visual Studio 2015 and 2013.
Pollynator, by David Paul McQuiggin, is a code-generation tool for creating service-dependency interfaces. Specifically, Pollynator helps you generate code that employs the Polly: Polly library for resilience and transient fault handling in complicated applications that rely on other local or cloud-based services. I can see this being really useful.
Speaking of cloud applications and services, Azure Functions and Web Jobs Tools provide essential tools for creating, debugging and publishing Azure Functions and Web Job projects if you're on a version prior to Visual Studio 2017 15.3 (these tools have been rolled into subsequent releases of Visual Studio).
If you want to create your own project templates, take a look at Sidewaffle Creator, by Sayed Ibrahim Hashimi. It includes a template format and associated tools that let you create custom project templates and integrate them into the New Project, Solution Explorer and context menu system within Visual Studio. This looks like one of those tools you'll need to sit down and really figure out, but that effort will pay off every time you start a new custom project.
Code licenses aren't just for laughs. If you're using third-party code or libraries in your projects, it's important to know how your dependencies are licensed. Package Licenses (see Figure 2) can help you with this by compiling a list of licenses for any NuGet packages in your solution. The extension infers the license from the projectUrl and licenseUrl properties in the package's metadata and downloads the relevant license text from GitHub and spdx.org.
Coming at this same dependency metadata problem from a different angle, if you're editing files in a Git repository, Git Web Links lets you get a link back to the file's repository on GitHub (or Bitbucket if that's how you roll). Git Web Link supports repositories hosted in GitHub, GitHub Enterprise, Bitbucket Server and Bitbucket Cloud. Right-click support is included for getting links from a file tab, Solution Explorer or a code selection in the editor.
is another powerful tool for working with source control, allowing you to search for comment text in Team Foundation Server (TFS) changesets and then merge those changesets. It includes "in-between" changesets in the search results even if they don't include the search identifier, making sure you merge the entire history.
More Handy Project Extensions
A step beyond project templates, Code Generation and T4 Text Templates provides design-time and runtime code generation for any Visual Studio project. Oleg V. Sych's T4 Toolbox for Visual Studio 2017 extends the code-generation functionality of T4 text templates to generate multiple output files from a single template, generate output to multiple projects or folders, and add or check out generated files from your source code control tools. T4 Toolbox also adds syntax highlighting, outlining, tooltips, error reporting and statement completion for T4 text template editing in Visual Studio.
CoCo, by George Aleksandria, analyzes your code to provide a sort of quasi-semantic syntax highlighting for C# code in Visual Studio 2017. (See my August 2014 Visual Studio Magazine article, "Semantic Code Highlighting," for more details about code colorization.) CoCo's highlighting is entirely customizable and provides colorization for namespaces, local fields, parameters, methods, constructors, events, properties and more (see Figure 3). A version of CoCo for Visual Studio 2015 is available, as well.
Fix Namespace, by Utkarsh Chauhan, does one simple and useful thing: It searches all the C# files in the current project and fixes the namespace based on the project default namespace and the file's folder relative to the project.
Another handy tool for fixing namespaces in C# projects is NamespaceFixer. The method for invoking is slightly different, but as with the previously mentioned extension, it uses your project namespace and folder hierarchy to define the correct namespace for each C# file in a project.
If you use Chris Dahlberg's StyleCop tools to enforce C# code style and consistency rules, check out the new StyleCop Check-in Policy 2017 extension. It works specifically with the StyleCop.MSBuild NuGet package, enabling you to configure your build settings so StyleCop warnings don't appear as errors during builds, but will keep team members from checking in bad code.
CheckoutAndBuild 2017, by Florian Gilde, helps Team Explorer users set up a local Continuous Integration (CI) environment. This enables you to clean, checkout, build your solution, run tests and more before checking in your code. The build process is highly configurable, allowing selective checkouts, custom build order, pre- and post-build scripts, complete visibility and control over pending changes, integrated error reporting, and more.
BuildOptimizer, by Alexander Satov, attempts to streamline and troubleshoot the build process. BuildOptimizer copies your project references, DLLs, and libraries, noting any mismatched versions, unused, or unreferenced projects and libraries. All of the error output shows you where the project (and thus your build) can be decluttered and optimized.
Fast Koala, by Jon Davis, enables build-time configuration transforms for various project types. You can run PowerShell and Node.js scripts with access to MSBuild project properties, as well as MSBuild scripts. The configuration changes can be applied to a project locally and then built on any system with access to the needed build dependencies and scripts without Fast Koala installed on the build system, including TFS build servers. There are some caveats: Web sites and ASP.NET 5 (which includes ASP.NET MVC 6) aren’t supported, and NuGet packages or other automated tasks that change web.config need to be considered closely ... but the possibilities are pretty intriguing.
Put Some Fun in Your Editor
It's not all code-test-debug. You can have some fun, too. Jefry Pozo's VSToDoList (see Figure 4) gives you a simple, hierarchical checklist window right inside Visual Studio 2013, 2015 or 2017. It's great for keeping track of your work tasks, but also for remembering to get groceries, take out the garbage, order more pizza ... you know, the important things in life.
PowerMode turns coding into a game, with particle effects, screen shake, combo mode and streak score counters, and more. Inspired by the official Code in the Dark editor, get your developer Kung Fury on and code with authority!
Finally, because his genius has been missed too long, say hello to ClippyVS, an extension for Visual Studio that resuscitates Clippy in (almost) all his glory (see Figure 5). It looks like you're starting a Web Project. How can I help? Probably not by installing this extension, but hey, it's fun, and yeah, I like Clippy and endorse this project.