GitHub Copilot Leads Productivity Gains in New Visual Studio 2022 17.8
In announcing Visual Studio 2022 17.8 today, Microsoft emphasized community-driven productivity gains among the new features and functionality.
Microsoft, which reportedly addressed nearly 100 feedback tickets in the new release, said it was "developed with extensive user feedback" and listed five major performance improvements spawned from the rank and file. "This release is a big deal not just for its extensive list of features but also for its emphasis on community-driven enhancements," Microsoft said today in its general availability announcement.
Leading off the list of productivity enhancements, however, was a non-community initiative called GitHub Copilot.
The original "AI pair programmer" created with advanced OpenAI tech rode the coattails of ChatGPT to spawn a whole industry of AI-powered assistants with the "Copilot" moniker. Now Microsoft is infusing copilots throughout its products and services, targeting offerings like Microsoft 365 and even Windows itself.
GitHub Copilot comes as an extension costing about $20 per month in the enterprise plan. It topped Microsoft's list of productivity gains, and its autocomplete functionality is now easier to get for Visual Studio developers, as it's now available as an optional component, making it easier to install along with a new IDE update.
The Copilot autocomplete feature acts like a supercharged IntelliSense or IntelliCode, as the tool analyzes a developer's coding context in order to generate code snippets, functions or even entire classes that a developer is likely to type in next, letting them accept or decline the suggested code or get new suggestions.
While GitHub Copilot wasn't a community-driven initiative, the next five productivity gains in Microsoft's list were related to tickets in the Developer Community site for feature requests, bug reports and other feedback. They are:
"We see lots of engagement on this Developer Community ticket," Microsoft said of the "create a pull request" item. "In response, you can now create a Pull Request, completing the entire inner workflow, in Visual Studio. Enter the New Pull Request window by clicking the link in the notification banner in Git Changes after pushing, or from the top-level menu via Git > GitHub/Azure DevOps > New Pull Request. In each preview version of Visual Studio since 17.7 preview 2, we've shared new updates on this experience, and we're excited to make this available as a feature to general audiences."
Other productivity gains affect remote Linux unit test support, making a global function static, sorting #include directives, Visual Studio update notifications (see the Visual Studio Magazine article, "Visual Studio 2022 17.8 Preview 3 Adds Update Notification"), GitHub avatars in the Git repository window and Teams Toolkit. Speaking of notifications, Microsoft also highlighted the the "Update on Close" option, which shows an overlay to the VS task bar icon to help devs know when the IDE will update, which you can read more about in the Visual Studio Magazine article, "Microsoft Cranks Out Weekly Visual Studio 2022 17.8 Previews as GA Nears."
Here's a look at other new features of the release.
C++ Game Development
The release enhances the diagnostics for C++ structures, improves the CMake Targets View and offers insights into the size and alignment of C++ classes, structs and unions. Additionally, it introduces hints for making member functions constant and updates the C++ Standard Library. For Unreal Engine developers, there's added support with a test adapter, code snippets and macro specifier suggestions. The update also includes a Build Insights Function View, structured diagnostics, C11 threading support and improvements to the Remote File Explorer, all aimed at bolstering game development efficiency and capabilities.
Enhancements here include new code fix functionality, refined autocompletion capabilities, a reduction in the noise within parameter name hints and advanced diagnostics for files even before they are opened. These updates are designed to streamline the F# coding experience, making it more efficient and user-friendly, Microsoft said. Overhauled F# code fixes in Visual Studio are detailed in the Visual Studio Magazine article, "What's New in Microsoft's F# Language for Functional-First Programming."
Here's a video showing the insertion of a missing keyword:
.NET and C# development boosts include the .NET Counters Tool for debugging scenarios, helping to monitor and diagnose performance issues. Additionally, there's guidance provided for the secure usage of secrets in HTTP files, enhancing security in development practices. The release also extends support for new instruments in the .NET environment through the Meters API, further enriching the capabilities for performance monitoring and analysis in .NET and C# applications.
There's only one item here, described by Microsoft thusly: "When you choose to open folder on your workspace with launch.json in the .vscode directory to store your launch and debug settings, it will be recognized by Visual Studio and included in the dropdown menu for the Debug targets right next to the green button."
Debugging and Diagnostics
As mentioned, the IDE now includes .NET Counters Tool within the diagnostics window now, providing developers with advanced capabilities for monitoring and diagnosing performance issues in real-time. Other items of note on this front include:
- Cross platform Enc/Hot Reload debugging support: This feature allows developers to edit and continue debugging apps hosted on Linux containers or in Windows Subsystem for Linux (WSL) with or without the debugger attached.
- Debug Linux App Services via Attach to Process: This feature enables developers to debug and diagnose issues within their running Linux Azure App Services instances by attaching to a process on the Linux machine.
- Test Profiling with VS Profiler: This feature allows developers to profile their tests using various tools such as CPU Usage, GPU Usage, File IO, .NET Async, and Events Viewer, and get a report of the results.
Two items here. First, there's a new code action feature for event handler method generation. This is especially useful when using events like @onclick in Razor files, where it automatically generates the corresponding C# event handler methods, even for custom event arguments. Second, developers can now opt to add a background color to C# code within Razor files. This feature, which is off by default, can be enabled in the options menu, offering a visual distinction for C# code blocks in Razor files for improved readability and organization.
A significant update here is a preview of the new IntelliTest feature. This advanced tool is designed to explore .NET code to generate comprehensive test suites, aiming for high code coverage. It uses the latest Z3 problem solver to create varied inputs that enhance code coverage, integrated into parameterized unit tests for each method. Notably, this version expands support to include .NET Core/Standard and x64 configurations, whereas previously this Enterprise Edition feature only supported code targeting the old .NET Framework. Developers can activate IntelliTest via the Manage Preview Features section and use it to generate and maintain a robust regression suite, keeping tests in sync with code updates. You can read more about this feature in the Visual Studio Magazine article, "Visual Studio 2022 v17.8 Previews New IntelliTest."
Microsoft noted two features to assist IT admins in deploying Visual Studio across organizations. First, the process of installing just the Installer has been simplified, allowing administrators to set up the client machine for standard users to update Visual Studio without needing administrator permissions. This is facilitated through a new command-line parameter. Second, a new policy called "AdministratorUpdatesNotifications" has been implemented. It enables admins to send notifications to users, prompting them to close Visual Studio so that essential updates can be applied seamlessly. The administrator update was previously blocked if Visual Studio was open and in use. The new policy is accessible through the Intune settings catalog and ADMX templates, enhancing the manageability of updates in enterprise environments.
Much more information about all of the above and further changes is available in the release notes, which covers Git tooling, SQL (upgraded Microsoft.Data.SQLClient (MDS) 3.0 to MDS 5.0 and more) and other areas, fully fleshing out the details.
Visual Studio 2022 17.8 was announced at the start of Microsoft's .NET Conf 2023 event, which also unveiled the general availability of .NET 8.
David Ramel is an editor and writer for Converge360.