12 tips for the new Visual Studio: Prepping for a future beyond Windows
By Alexandra Weber Morales
Microsoft Visual Studio is the most popular integrated development environment in the world, but the target keeps moving for IDEs. As device, language, platform and application diversity expand ever more rapidly, Redmond is working overtime to make its already powerful developer tools irresistible—to both the faithful and the uninitiated. The technologies and experiences that are being incorporated into the next version of Visual Studio—currently in preview—show a company attuned to the growing power software developers wield in companies today.
With such a powerful tool and so many different ways to use it, it can be overwhelming to consider the possibilities. We’ve gathered a dozen ways you can improve your Visual Studio experience—and be ready for the next release.
1. Go lightweight with Visual Studio Code. Microsoft has publicly acknowledged that the success of Visual Studio means it must become accessible to non-Windows developers. “One of our biggest requests is, ‘When will there be Visual Studio for Mac?’ Now we have Visual Studio Code,” said Scott Hunter, Microsoft’s director of program management for the Azure developer experience team, in a recent Channel 9 video.
With Visual Studio Code, cross-platform dreams can come true without command-line programming. A recent tutorial from Peachpie, makers of the PHP compiler, showed how to create PHP programs for the new .NET Core with Visual Studio Code. The new IDE may be lighter, but it enables .NET debugging features. And don’t forget that you can build it up in impressive ways: It plays nicely with extensions.
For example, the C# for Visual Studio Code extension, powered by OmniSharp, offers lightweight development tools for .NET Core. Its C# editing includes such favorites as syntax highlighting, IntelliSense, Go To Definition, and Find All References, as well as debugging for .NET Core (CoreCLR).
2. Solve your problems with extensions galore. If you need to figure out how to do something on Visual Studio, it’s likely someone else already has—and has published a helpful extension to boot.
The dream of most ISVs these days is not just to launch products, but to build platforms with ecosystems similar to Apple’s app store. With more than 6,000 Visual Studio extensions in its marketplace, and nearly a million extension downloads per month, Redmond has a thriving Visual Studio partner community. For example, if Continuous Delivery is one of your team’s aspirations, you may be able to achieve it, not with an expensive consultant, but via a few simple extensions. Hey, we can dream, can’t we?
Launch Darkly, for example, is a Visual Studio extension that helps teams use feature flags to deploy gated functionality the way Google and Facebook do. Features can be toggled on or rolled back independent from deployment, and their life cycle and user feedback can be tracked within Visual Studio Team Services.
3. Install only what you want—faster. In August, Microsoft released Visual Studio “15” Preview 4, which is steadily ramping toward the next version of the venerable IDE. Of the many incremental improvements, it was interesting that the company chose to highlight the new, customizable setup engine, which can speed up installations and reduce install sizes from the ponderous 6GB of the previous release to a feasible sub-500MB on disk.
“Everyone who has installed Visual Studio has at some point been unhappy that it ground the hard drive for an hour and a half or two hours,” said Hunter. “The preview 4 that we just shipped was the first one with the new installer where now Visual Studio only installs the stuff you ask for. It installs your Visual Studio into a folder, which it does today as well, which means if you want to uninstall Visual Studio, you nuke the folder and the registry’s gone, the tools are gone. The idea is that, in the future, you’ll be able to decide what channel you want to run your VS in—your alpha channel, your beta channel. The plan is to make these update mechanisms much faster.”
There is more streamlining to come prior to Visual Studio’s next full version, including automated deployments, offline installation and componentization, according to a blog post by John Montgomery, director of program management for Visual Studio. All of this is welcome news to many developers, though others are more accepting of the load, given the amount of functionality baked into the IDE.
“I have heard a lot of complaints about the size of Visual Studio. That has been one of the hurdles for non-Microsoft people said Ed Charbeneau, a developer advocate with Progress. “They have revamped the installer, and it’s much more lightweight, but depending on what you are working on, those things may need to be installed anyway. I think it’s a great move, because not every developer uses the kitchen-sink scenario. Maybe you don’t need the HoloLens emulator installed. For someone just doing web development, they’re not going to need emulators bloating up their environment.”
4. Go ahead and run .NET on Mac and Linux. “.NET Core has brought a lot of non-.NET people into the .NET space because it runs on Mac and Linux,” according to Hunter. “If you wanted to run a workload on Linux containers, .NET did not have a solution for you. Now it does.”
Released in June 2016 along with Visual Studio 2015 Update 3, .NET Core 1.0 supports cross-platform apps for ASP.NET Core, command-line interfaces, libraries and Universal Windows Platform.
5. Program smarter with new C# features. As any successful language should, C# is evolving. Version 7.0 has many new programming features that are supported in the latest Visual Studio preview. These include tuples, deconstruction, pattern matching and local functions.
6. Write once, run on any mobile platform. Microsoft may be losing the mobile OS race against Android and iOS, but it’s doing a great job of preparing the way for a plethora of enterprise mobile applications that will follow in the footsteps of the initial consumer mobile app explosion. With the purchase of Xamarin and new tools for Apache Cordova, Visual Studio is arguably a superior IDE for mobile app development than anything available for Android or iOS.
“A well-known pain point for Android developers is working with the Google Android emulator, which is not very performant,” said Charbeneau. “But it’s not as well known that Microsoft has one of the best emulators for Android out there—and it’s built into Visual Studio.
“There’s also really interesting stuff being done around iOS. Apple is very strict in how you must develop for their platform, and they require you to have a Mac to compile and run the application on. Now, through Visual Studio, you can run the iOS simulator for Windows by Xamarin. If you have a Mac attached to the network, this will reach out to that device. So you still need a Mac attached to the same network as your development machine, but it keeps you from having to swap desktops or workstations.”
The August 2016 TypeScript 2.0 release candidate boasted a tagged unions type capability that resembles that of Rust, F# and Swift. Literal types have expanded beyond just string to include boolean, enum and number. While some debates still rage about the relative merits of TypeScript vs. Facebook’s Flow, there’s no question that TypeScript within VS is a mean machine.
8. Put the “I” back in team with Visual Studio Team Services. With social media and games sucking up so much headspace, ISVs have long searched for ways to gamify and socialize the work experience in such a way that it becomes similarly addictive. Slack has made the most headway in workplace messaging, but never underestimate Microsoft’s ability to ride a trend. Visual Studio Team Services launched a redesign of its version of social coding with Git. The UI has been updated around pull requests with auto-complete, and comments now allow markdowns and emojis.
Continuous Integration is also getting better and better, as tasks with Jenkins (the open-source Continuous Integration and automation server) become first-class citizens in Team Services. You can validate Team Services pull requests with Jenkins, do Jenkins CI on your Git repository, and use Jenkins build artifacts in a Team Services test, build, or release.
With Continuous Delivery pipelines, everything gets faster, and quality can suffer. That’s why Team Services now lets you link test results to requirements and visualize them with dashboard widgets.
Within the Visual Studio IDE, Microsoft has added a social media-inspired method of gathering feedback, sharing knowledge and enhancing community, according to Amanda Silver, director of program management for Visual Studio.
“This little glyph at the top of the screen allows you to send feedback and report a problem. One of the new experiences is, you can see trending issues. So I can very easily plus-one an issue that’s been reported,” she told the audience in her Build 2016 conference demo of new features in the IDE.
9. Hack your build time with a task runner. Build time is a common problem, especially with the ever faster pace of development. Far too often, developers are unaware of task runners besides MSBuild. Now you have options: “Developers love to automate repetitive tasks, so Microsoft has added support for several popular task runners, including Grunt, Gulp, and Node Package Manager tasks,” said Charbeneau.
10. Be on them bleeding edge with IoT and HoloLens. IoT applications are becoming a reality thanks to commodity hardware and cloud infrastructures. The missing piece? A powerful development environment. In a video from September, Microsoft program manager Daniel Jacobson demonstrated building a Universal Windows IoT app that replaces—and augments with additional information—the traditional ringing bell that alerts shop owners to customers entering.
Microsoft’s HoloLens is another new form factor. Again, the developer experience will be critical for building augmented reality applications that are not only spectacularly immersive, but free of defects and possible dangers to users. Creating 2D and 3D spatial applications isn’t just for game developers any more!
11. Snazz up your XAML with slick UI tooling enhancements. If you’re a .NET developer who loves XAML for visual presentation of applications, you’ll love the WYSIWYG, real-time feel of new XAML tooling in Visual Studio. New XAML UI debugging tools show visual elements at runtime and indicate problems such as generating hidden elements at load that slow down application startup time. “XAML edit and continue is another new tool that will transform the way people will create XAML applications,” said Jacobson in a recent IoT demo video.
12. Write blockbuster games more efficiently with Unity on VS. The stakes for game developers are higher and the requirements more demanding than for corporate developers. As a result, powerful IDEs and life-cycle-wide tools are a necessity, not a luxury. Many Unity game developers enjoy Visual Studio for the enhanced productivity and native support for Unity, the multiplatform gaming engine written in C#. Unity scripts in C# enjoy IntelliSense, refactoring, code navigation and a superior debugging experience. The Unity Project Explorer lets you browse your project as if you were in Unity. Finally, Unity is perfect for 3D HoloLens app development.
Bonus: Become a power user
There’s never been a better time to become a ninja Visual Studio warrior, and a wealth of extensions can help you cut a path through Redmond’s enchanted forest of features. To help you on your way, Charbeneau suggested the Productivity Power Tools 2015 set of extensions to Visual Studio 2015.
“There’s a feature that bubbles up error messages to the Solution Explorer window. This lets you see errors at the project level, helping you locate the files that need your attention,” he said. “It also has scrollbar markers, which is a feature that displays colored ticks in the scroll bar that identify code changes, break points and errors. This is essential for projects that have code that spans hundreds of lines of code in a single file.”
Code faster and save your eyes doing it? Sounds like a plan!
What do developers say about Visual Studio?
Wayne Citrin is the founder and CTO of JNBridge, whose tools connect Java and .NET frameworks; he is a former computer engineering professor at the University of Colorado, Boulder.
SD Times: How have you customized Visual Studio for your needs?
Citrin: Visual Studio is the water I’ve been swimming in for over 15 years. Just as a swimmer doesn’t customize the water he swims in, I haven’t spent any appreciable time customizing Visual Studio. I’ve laid out the sub-windows the way I like them, and that’s about it. I make myself productive by adjusting my process to Visual Studio. Life’s too short to spend too much time customizing software.
Where would you like to see improvements?
One thing I would like to see in future versions of Visual Studio is the ability to easily retarget projects for different versions of .NET. Right now, in the Configuration Manager, I can choose between Release and Debug builds, and between 32-bit, 64-bit, and any CPU, but I cannot specify .NET 2.0, 3.x, or 4.x without actually going in and editing the individual projects. The only way I can target multiple .NET versions is to actually edit the project itself, or to maintain two different versions of a project. It would be far more productive if I could specify .NET version in the Configuration Manager along with bitness and Release/Debug.
Other than that, I find that Visual Studio provides a happy medium between environments that do too little and those that do too much. I find it more productive to use Visual Studio than minimalist environments that require the developer to use a text editor and then build using the command line. On the other hand, unlike environments like Eclipse (another environment I swim in) that blur the act of editing and building, Visual Studio keeps the two separate, and doesn’t attempt to build my code until I tell it to do so with a discrete action.
Alex Sopinka is founder and CTO of Hamilton, Ont.-based Tasytt, which makes a corporate learning platform and conversational bot for sharing institutional knowledge over messaging systems like Slack.
What do you use Visual Studio for?
Sopinka: I use Visual Studio as the Tasytt platform is built with .NET. I love the Azure integrations so I can manage the cloud from within Visual Studio (and build with the SDKs). Debugging has also always been phenomenal with VS (as long as you don’t have multiple threads coming in).
Where would you like to see improvements?
Our bot, Obie, is hosted on Azure but was built with Node.js in an OS X environment. It’s a lot lighter than VS, using a text editor and command line to build and run. Debugging is a lot harder though. One thing VS could do better (somehow) is speed up building. With a robust platform like Tasytt, build times are at least one minute, plus IIS app pool recycle time. For tiny changes while debugging, this starts to add up quickly.
Based in the Louisville, Ky. area, Ed Charbeneau is a developer advocate at Progress.
What’s your Visual Studio experience?
Charbeneau: I’ve used Visual Studio for all of my career. While I’ve used other editors and development environments, Visual Studio has always been my go-to tool for professional projects. Throughout the years, as I gained experience, Visual Studio has gotten more robust. I’ve watched it grow along with my needs as a professional. In the web development space specifically, Visual Studio has really excelled over the years.
What do you like about Visual Studio?
It doesn’t matter what type of development you’re doing—desktop, cloud, mobile, web, gaming, VR and AR—Visual Studio has tooling to support you. We’re not talking just Microsoft ecosystems here either; you can create apps that deploy to iOS, Android and Linux.
Any tips or tricks?
Quick Launch, in the upper right-hand corner of Visual Studio, is capable of searching through VS features, menus and settings to help you find exactly what you’re looking for. This is a feature every developer should know about, since there are so many development options and windows available in VS that it would be impossible to remember where to find everything.
To simplify things, Microsoft added a global search function. From Quick Launch you can type what you’re looking for and instantly go to the menu, or open the window you need. For example, if you needed to change the font in your editor, you could simply type “font” in Quick Launch and it will bring you directly to the “font” setting in VS. If you’ve lost your Test Explorer window, a quick search for “test” will bring you to it.