Visual Studio 2022 Preview release notes
Version 17.12 Preview 1
Released August 13th, 2024
We’re excited to announce the availability of Visual Studio 2022 v17.12. This update focuses on providing fantastic developer experiences for working with .NET 9 projects and new AI productivity features, along with continues improvements all-around.
Productivity | From the community |
---|---|
Copy from the Error List Preview 1 | Feedback ticket |
Go to line anywhere in Code Search Preview 1 | Feedback ticket |
Dock the Code Search window Preview 1 | Feedback ticket |
Manage file renaming with Git Preview 1 | Feedback ticket |
Pull requests using drafts and templates Preview 1 | Feedback ticket |
Create internal GitHub repos Preview 1 | Feedback ticket |
Debugging & diagnostics | From the community |
---|---|
Blazor WebAssembly debugging Preview 1 |
IDE | From the community |
---|---|
Multi-Project Launch Configuration Preview 1 | Feedback ticket |
MotW security warnings Preview 1 |
Desktop | From the community |
---|---|
Enhanced WinUI components search Preview 1 |
Web | From the community |
---|---|
HTTP File support for Request Variables Preview 1 | Feedback ticket |
Vitest support in JavaScript and TypeScript Preview 1 | Feedback ticket |
Inlay Hints support for more languages Preview 1 | Feedback ticket |
.NET | From the community |
---|---|
Achieve more with .NET 9 Preview 1 | |
NuGet audits transitive packages Preview 1 | Feedback ticket |
Top bug fixes | From the community |
---|---|
Error in Azure DevOps pipelines with VSTest@2 Preview 1 | Feedback ticket |
Highlighting open brace doesn't highlight closing brace Preview 1 | Feedback ticket |
Find and replace keeps reverting Selection to Current document Preview 1 | Feedback ticket |
MSVC incorrectly considers reference to a cv-/ref-qualified function type to be ... Preview 1 | Feedback ticket |
Assert triggered in ResourceManager.cpp on high core cpu's Preview 1 | Feedback ticket |
Bug in x86 build inlining destructor with SPGO enabled Preview 1 | Feedback ticket |
Note
See the full list of all the user-reported feature requests and bug fixes that made it into this release.
Productivity
Copy from the Error List Preview 1
Copying an error from the Error List now copies just the description instead of the entire row to the clipboard.
You see an error in the Error List that you don't know how to fix. So, you select it and hit Ctrl+C
to copy the description for a web search. After you've pasted it into the search engine, you realize it copied all column headers and row values instead of just the description. Now you must delete everything except the error description before you can perform the web search. This is cumbersome, but now we have a fix!
When you copy an error from the Error List using Ctrl+C
, only the description is copied to the clipboard. This makes it easier to search for the error online or share it with others.
You can still copy the entire row by right-clicking the error and selecting Copy Row from the context menu or hitting Ctrl+Shift+C
.
If what you wanted to do with the error description was to do a web search, then just hit Ctrl+F1
to search for information about the error online.
📣 See feature ticket to share your feedback and continue the conversation.
Go to line anywhere in Code Search Preview 1
In Code Search, you can now navigate to a specific line in the current document or other specified document.
Sometimes you know that there's an issue on a certain line in your code and you want to get to it quickly. Maybe you were told about an error being thrown on line 43 of some file, or you want to get to the bottom of a specific file.
Code Search now supports quick navigation to a specific line in your code.
Open Code Search and go to a line in the current document by using colon + line number. For example, :39
will navigate to line 39 in the active file.
You can also go to a line in a different document by using file name + colon + line number. For example, Order:43
will navigate to line 43 in Order.cs. If you don't specify the exact file name, then the search will try to find the best match.
📣 See feature ticket to share your feedback and continue the conversation.
Dock the Code Search window Preview 1
You can now freely position the Code Search window with capabilities like docking and auto-hiding.
If you need Code or Feature Search to stay out of your way, you now have more control over the behavior of the search window.
You can now dock the search window and perform tool window actions with it, like Solution Explorer and others.
After opening Code Search or Feature Search, click on the box icon at the top right to convert it into a tool window. You may choose to dock it elsewhere, pop it out, auto-hide, etc. You can revert to the dismissible window by closing the tool window and reopening search.
We've also simplified and cleaned up the previewing experience in search. There is now one button, indicated with an eye icon, to toggle the preview on and off.
The position of the preview panel will also adjust based on the dimensions of the search window.
📣 See feature ticket to share your feedback and continue the conversation.
Manage file renaming with Git Preview 1
Get peace of mind when renaming files with a new notification.
When you rename files from solution explorer, you'll be reminded to stage your changes to see the renames in Git. This boosts your confidence that Git is recognizing your file change and tracking it correctly. We found this to be a point of confusion for many customers, so we worked with folks in the Developer Community to produce a new notification.
📣 See feature ticket to share your feedback and continue the conversation.
Pull requests using drafts and templates Preview 1
Create pull request drafts and start your descriptions with templates in Visual Studio.
You can now create pull request drafts and start your descriptions with GitHub templates in Visual Studio. These were the two top requests for the create a pull request experience.
Draft PRs
Use the drop-down menu on the Create button to Create as Draft.
PR Templates
Your default PR template will be used when creating a new PR for both GitHub and Azure DevOps. Learn more about how to add a PR template to your repository in the GitHub documentation and Azure DevOps documentation.
Note
This feature must be enabled under Tools -> Manage Preview Features
📣 See feature ticket to share your feedback and continue the conversation. And take this survey to help make the feature even better.
Create internal GitHub repos Preview 1
Visual Studio now supports creating internal repos and includes guidance for each type of repository to give you more confidence when starting a new project.
Visual Studio now supports internal repos for your GitHub organizations. We also included guidance for each type of repository to give you more clarity on the visibility of the new project depending on which account you're using.
📣 See feature ticket to share your feedback and continue the conversation.
Debugging & diagnostics
Blazor WebAssembly debugging Preview 1
A preview of the improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later.
Visual Studio now offers a preview of an improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later:
- Data types shown in the debugger now match the expected .NET data types.
- Type members and member visibility use expected icons.
- The displayed call stack is cleaned up to only shows the .NET call stack and correctly honors the Just My Code setting.
- The modules window is now supported.
- Expression evaluation support in the Immediate window and for watches and conditional breakpoints is expanded and improved.
To enable the new preview debugging experience:
- Enable the Enable new .NET 9+ Mono debugger setting.
- Install the latest .NET 9 SDK.
- Update your Blazor app to target .NET 9.
Known limitations:
- Hot reload while debugging is not yet fully functional. This will be addressed in a future update.
IDE
Multi-Project Launch Configuration Preview 1
Streamline debugging by setting up and saving launch profiles for specific projects within multi-project solutions. Share configurations effortlessly with your team.
The Multi-Project Launch Configuration feature allows you to set up and save profiles for launching specific projects within a multi-project solution in predefined states for debugging.
This simplifies the process of working with complex solutions, improves debugging efficiency, and enables easy sharing of configurations among team members.
Note
This feature must be enabled under Tools -> Manage Preview Features
📣 See feature ticket to share your feedback and continue the conversation.
MotW security warnings Preview 1
Mark of the web (MotW) security warnings are now integrated into the overall trust functionality.
Visual Studio will show a security warning when it detects that you're attempting to open content tagged with the Mark of the Web (MotW) identifier.
This new trust-related warning conveys the risks of opening content from potentially unsafe sources like internet downloads.
You can modify the default trust experience by going to the Trust Settings under Tools > Options > Environment.
Desktop
Enhanced WinUI components search Preview 1
Enhance WinUI project setup with improved Visual Studio Installer search, simplifying component location for developers.
Streamline your WinUI project setup further with our latest Visual Studio installer update! Developers can now quickly locate WinUI-related components, eliminating the previous frustration of navigating through an empty search result. This enhancement simplifies the development environment configuration, allowing for a more intuitive and efficient user experience.
Open the Visual Studio Installer, go to individual components tab and search for WinUI related keywords (WinUI, WinRT)!
Web
HTTP File support for Request Variables Preview 1
HTTP files now support Request Variables. That is where you can send a request and then use data from the response, or request, in future requests.
When working with HTTP files, a common scenario is calling an endpoint and taking a value from the response and sending in a subsequent request. For example, you may call an endpoint to authenticate a user and then on later calls you can pass the token that was returned from the login endpoint. Prior to this release this was not possible in Visual Studio. In the snippet below you can see an example of how this works in an HTTP file.
# @name login
POST {{TodoApi_HostAddress}}/users/token
Content-Type: application/json
{
"username": "{{myusername}}",
"password": "{{mypassword}}"
}
###
GET {{TodoApi_HostAddress}}/todos
Authorization: Bearer {{login.response.body.$.token}}
###
In the above snippet there are two requests, the first calling into the /users/token
endpoint to authenticate the user. Immediately above the request line, you'll see the
comment # @name login
. This syntax gives the request a name (login
in this case) and
configures it as a Request Variable. When the request is sent you can access values
from the response, or request, in any future request that is sent from that HTTP file.
Since this is a request to login, you should be careful to secure your secrets.
In Visual Studio we have support for accessing secrets in a secure manner. See this
section
on the docs for more info on handling secrets.
The second request calls into an authenticated endpoint, /todos
, which will return the
todo
items for that user. In the request the token is passed in as a header with the
line.
Authorization: Bearer {{login.response.body.$.token}}
The /users/token
endpoint returns a response in JSON. The token is extracted with a
JSON Path expression, $.token, on the body of the response. If you are using an endpoint
that returns XML, instead of a JSON Path expression you can pass in an XPath expression.
The support in Visual Studio has been inspired by the existing OSS extension for
REST Client
that is available for Visual Studio Code. You can learn more about Request Variables
there. We will be adding docs soon to discuss this support in much more detail.
📣 See feature ticket to share your feedback and continue the conversation.
Vitest support in JavaScript and TypeScript Preview 1
When using JavaScript and TypeScript projects you can now author test cases with Vitest.
In JavaScript and TypeScript projects (JSTS), projects that have the extension .esproj, we have added support to discover and run tests authored with Vitest. To get started with Vitest tests, in a JSTS project add the vitest package using the npm in the Solution Explorer and then modify the project file to have the following properties declared.
<JavaScriptTestRoot>test\</JavaScriptTestRoot>
<JavaScriptTestFramework>Vitest</JavaScriptTestFramework>
Ensure that the value for JavaScriptTestRoot has the correct relative path to where your test files are located.
Add your tests to the correct folder and build the project/solution. After that, you should see the test cases in the Test Explorer.
In the Test Explorer you can see the different test cases that are discovered and execute the test cases.
We have not yet added support for debugging, but we will be adding that support soon. Another known issue is when you double click on a test case in Test Explorer, it will take you to the first line of the file where the test case is defined. We will be improving this experience as well.
📣 See feature ticket to share your feedback and continue the conversation.
Inlay Hints support for more languages Preview 1
Inlay Hint support has been added to JavaScript, TypeScript, Python and Razor as well as a setting to control its behavior.
Inlay hints show additional information about source code that is rendered inline. This is usually used to show inferred types, parameter names, and other implicit information from your code directly in your editor.
We have added support to show Inlay Hints in JavaScript, TypeScript, Razor, and Python. We have also added a new setting so that you can customize the behavior of hints across these languages. This setting doesn't apply to C# and C++ yet. To enable Inlay Hints for these languages you can use the new setting at Tools > Options > Text Editor > All Languages > Inlay Hints. You can see the new option in the following image.
There are three different values for Inlay Hints.
- Always Always show the Inlay Hints.
- While Pressing Alt+F1 Only shows Inlay Hints while Alt and F1 are pressed. This is the default value.
- Never Inlay Hints are never shown.
For JavaScript and TypeScript, there is an additional options page to configure the behavior of Inlay Hints. This can be found at Tools > Options > Text Editor > JavaScript/TypeScript > Advanced > General.
Those options are shown in the image that follows.
By default, all these options are disabled, you should enable the hints that you are interested in viewing for JavaScript and TypeScript files. In a future update we may change the default values for these options. In the image below you can see a JavaScript file that shows Inlay Hints.
In the previous image the Inlay Hints that are shown are the gray boxes with : number
to indicate the type of the variable.
📣 See feature ticket to share your feedback and continue the conversation.
.NET
Achieve more with .NET 9 Preview 1
.NET 9 elevates cloud-native and intelligent app development, focusing on productivity enhancements, streamlined deployments, and accelerated AI integration.
.NET 9 elevates cloud-native and intelligent app development, focusing on productivity enhancements, streamlined deployments, and accelerated AI integration, ensuring superior performance for developers across various applications. And Visual Studio 17.12 fully supports .NET 9 development making it easy for you to take full advantage of all the improvements it has to offer.
Additionally, you'll find updates to features around the IDE that make working with .NET and ASP.NET more delightful than ever.
NuGet audits transitive packages Preview 1
NuGet is changing default audit settings to include transitive packages.
NuGet Audit, first added in Visual Studio 17.8 (and .NET 8), provides warnings during restore if any packages used by your project have known vulnerabilities.
For more information on NuGet Audit, including all configuration options, see the documentation on NuGet Audit.
In this release, NuGet Audit defaults for NuGetAuditMode have changed. Previously, only direct package references were being reported by default (<NuGetAuditMode>direct</NuGetAuditMode>
).
Now, by default it will warn on both direct and transitive packages (<NuGetAuditMode>all</NuGetAuditMode>
) with known vulnerabilities.
To retain the previous defaults, you can explicitly set your preferred value of NuGetAuditMode in your project or Directory.Build.props file.
Alternatively, you can set SdkAnalysisLevel to a version number lower than 9.0.100 but be aware this will affect all features that use SdkAnalysisLevel.
NuGet Audit requires a package source that provides a vulnerability database. NuGet.org provides vulnerabilities from the GitHub Advisories Database.
Starting with Visual Studio 17.12, it's now possible to specify audit sources in NuGet.Config files, so it's no longer required to use nuget.org as a package source.
If you're not using nuget.org as a package source and wish to use NuGet Audit for vulnerable package reporting during restore, add the following to a NuGet.Config file in your solution directory:
<confiuration>
<!-- any existing config, including <packageSources> -->
<auditSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
</configuration>
📣 See feature ticket to share your feedback and continue the conversation.
Tip
If there are any features you'd like to see in future updates to Visual Studio, please let us know by submitting a feature ticket.
Note
Our roadmap shows the priorities and direction for the future of Visual Studio, so make sure to check it out.
Note
This update may include new Microsoft or third-party software that is licensed separately, as set out in the 3rd Party Notices or in its accompanying license.
From all of us on the team, thank you for choosing Visual Studio. If you have any questions, please reach us on Twitter or Developer Community.
Happy coding!
The Visual Studio team