The next Visual Studio is all about extensions
- 11 November, 2016 22:00
Microsoft is making extensibility a key goal for the planned Visual Studio 15 upgrade along with other changes, including performance monitoring for extensions, a company official said on Thursday.
Extensions are code packages that provide new or improved Visual Studio features. In that vein, Microsoft seeks easier installation of tools and better performance and productivity, said Tim Sneath, principal lead program manager for Visual Studio. Among the improvements is a performance monitoring system. “Customers will now see a gold notification bar when an extension is slowing load time or typing speed,” Sneath said. Visual Studio 15 has been available in a preview stage.
Microsoft also is recommending best practices for extension authors. These include using rule-based contexts to specify conditions when an extension can be loaded, as well as using AsyncPackage in Visual Studio 2015 and above so that packages can be loaded on a background thread. In addition, authors should review an extension’s command filters and editor event handlers, and they should perform operations longer than 50ms asynchronously. Work performed during package initialization should be minimized and deferred until invocation of user action.
Microsoft noted users have expressed a desire for tools to identify and disable slow extensions. “One of the best things about Visual Studio is its extensibility,” one user said on the Visual Studio UserVoice page. “The problem is, the more extensions I install, the less stable my Visual Studio gets, the more memory it takes, and sometimes it even takes constant CPU even when minimized.” Users can see the performance of extensions by selecting the Help/Manage Visual Studio Performance menu item.
Also featured in the upgrade are batch extension updates and installs intended to make it easier to apply to multiple extensions, and Microsoft has built a way for extension authors to express dependencies by extending the VSIX manifest. A VSIX file has served as a unit of deployment of extensions. “The model is designed so that if dependencies are missing, the extension installer can acquire and install the missing components automatically,” says the company. Also, extension assemblies can be compiled into native images during install time, improving performance.
Still experimental, the lightweight solution load feature to shorten load times in Visual Studio "15" could impact an extension if a project has to be fully loaded. “Our team is putting together steps and guidance on how extensions can know when projects are not yet fully loaded and how to respond accordingly,” said Sneath. “We will share this guidance as soon as possible.”
Also with Visual Studio 15, Microsoft is transitioning to Visual Studio Marketplace for finding extensions. “In the next months, we’ll begin the process of retiring the old Visual Studio Gallery. You don’t have any work to do if you’re an extension author – we’ll migrate all the data across automatically.”