I started using Visual Studio the moment it launched 20 years ago. Before that, I had been using Visual C++, so it was a natural step. In fact, when I first heard it had been two decades since its release, I thought surely it was longer. I’ve been using Microsoft tools since the mid 80s, and I didn’t remember much before Visual Studio! But here we are, just past the 20th anniversary—and now Visual Studio 2017 is here.
So much has changed in that time. Every release of Visual Studio has new libraries and frameworks, new project templates and new capabilities of the IDE itself. They also typically improve some annoyances. So when it comes to Visual Studio 2017, what should you look forward to?
(Brush up on your Visual Studio 2015 knowledge here while you’re waiting for my next course – coming soon! – on Visual Studio 2017.)
1. Faster startup time
The first thing you’ll notice is a much faster startup time, and faster loading of large solutions. Faster is always good. If you get code from someone and you want to open it in Visual Studio, you can just do that – no solution or project required. Just use the new Folder command under File, Open, and all the files in the folder will be opened and you can use Solution Explorer to move around between them, as well as exploration commands like Go To Definition and more.
2. Run to Click / Run to Cursor
Out of the many new things in Visual Studio 2017, I want to highlight one little detail: Almost nobody knows about a debugging feature called Run To Cursor. I don’t know how many releases of Visual Studio it’s been in, but it’s been around for more than a decade. Yet, whenever I use and it and work with someone new, they invariably say, “Hey! What did you just do?!”
It’s a way to jump a few lines ahead (past a loop, let’s say) without mashing on the Step Over button dozens of times or having to set a breakpoint and then clear it. You just right-click, and then mouse your way to the Run to Cursor command on the context menu. Or, use the keyboard shortcut—assuming of course that you had any idea this command even exists. I have shown it to hundreds of people who had no idea it was there!
And in Visual Studio 2017, they’ve surfaced it in a delightfully unobtrusive way. When your application is stopped at a breakpoint, as you move the mouse over code, a small version of the debug “go” toolbar button will appear at the left of each line. Click it to run the application to that line. No breakpoint will be created—it will be just as though you clicked Step Over however many times it would have taken to get there. They call it Run to Click because it doesn’t matter where the cursor is at the moment you click, unlike the Run to Cursor context menu command. Other than that, they are the same. It’s such a tiny thing, but it brings your frustration down dramatically, trust me. I hope this new UI lets more people discover a way to stay in flow while you’re debugging and not get caught up trying to work the tool, leaving a trail of sad breakpoints behind you.
3. Find All References
As a consultant, I spend a lot of time reading other people’s code, and so I love the tools in Visual Studio that help you find specific types or functions, or the places in your code that use them. Some of these have been around unchanged since that very first release, but others are freshened regularly. If you don’t know what Find All References does, or you’ve never used the Go To command on the edit menu to get to a particular line in a file, then it’s past time you learned these ways to navigate code quickly. In this release, Find All References has new filtering, sorting and grouping to make it even quicker to narrow in on the code you’re looking for.
4. Go To commands
In Visual Studio 2017, there are six new Go To commands that can dramatically speed up the how you learn your way around code. The old Go To went to a specific line number, but now you can enter the name of a file, a type (class), a member or a symbol. If the code base you’re working with uses the same string of characters in many different names, this will make things much quicker for you.
5. Install new Workloads on the fly
When you install Visual Studio, you choose specific workloads that you want to use such as Desktop development with C++ or Azure development. If you want to start working in another language or targeting another platform, you don’t need to re-install Visual Studio or make changes using Control Panel. You can use the Quick Launch feature at the top right (another part of Visual Studio too few people know about) and just start typing the kind of work you want to do. Look for a suggestion labeled workload. For example, if you typed Python, one of the choices might be “Python development (workload).” Choose that and the templates and other components you need will be installed for you. You can also launch the installer from the New Project Dialog. After all, it’s usually while looking at that dialog that you realize you’re missing some project templates! Again, this is a small change, but not having to exit the product, bring up some other tool and go through an installation process makes a difference and keeps your mind on what you are there to do.
Microsoft is having a small giveaway for their Visual Studio Enterprise subscribers. Log into Visual Studio and snag your new benefits!