The latest update to visual studio 2022 was just released and this brings it up to version 17.5
In this release you'll find lots of awesome new features and improvements
I want to show you just a few of my favorites.
We start by adding a new item to the project. This opens up the new compact add new item dialog.
You can still choose to see all the templates by clicking the button and go back to the compact
view by clicking the button again. We give the file a name and hit enter when we're done. This creates
the file using the template that matches the file extension, adds it to the project, and opens it up.
I hit Ctrl+Shift+A to invoke the command again, and I can hit ESC to clear the input field.
I'm going to create two files starting with test.html, then a comma and then test.html.css
hitting enter and now I have those two files added to my project. It can also create a folder simply by
type the name of the folder followed by a slash. Hit Enter and the folder is added to your project.
To add a file to that folder just select it and invoke the dialog again.
You can name the file anything you want. From here you can create another file in a subfolder.
Start by typing the name of the folder, forward slash, and then the name of the file.
An .http file is a simple text file that allows you to send requests to any URL. Just specify a
method and a URL and click the green arrow. when you're ready to execute the request
on the right hand side you'll see the response returned from the server.
You can construct URLs that will hit your local endpoints and even send HTTP headers
along with the request. This lets you both test and document how to call your API.
In this example we're calling the exact same URL but we're using variables that makes it
a lot easier for me to both customize and modify the endpoints I'm calling.
You can specify multiple requests in a single .http file by separating them with three pound signs (###).
Right-clicking a URL shows the Send Request command and its keyboard shortcut Ctrl+Alt+S
This allows you to easily execute any request that the cursor is on by hitting that shortcut
We'll start by enabling the feature go to Tools -> Options search for the keyword "search" and select
"Preview Features". Now check the checkbox next to ?"New Visual Studio Search experience" and restart
Visual Studio. You now have the new all-in-one search experience. From here you can select Code
Search or Feature Search. Code Search lets you search through all of your files, class names,
method names and so on and it's super fast. Just hit enter to open the file. Code Search shows you
a preview to the right side of the search results, but you can move that underneath if you prefer
that or disable it completely. From the preview you can do code navigation such as Go To Definition
or refactoring such as rename of variables. This way I don't even have to open the specific file
in order to do my refactorings throughout the entire solution, making this a lot more efficient.
Feature Search or Ctrl+Q allows me to search for features throughout the Visual
Studio IDE - for instance, the Text Explorer tool window. I can also search for individual options
in the Tools -> Options dialog directly from the Feature Search. Here I'm searching for
a way to change the keyboard shortcuts and it takes me right to the place I want to be
so that was just a few of my personal favorite features. I want to know from
you what are your favorites from this new release? Let me know in the comments below.
And as always make sure that you hit that Like and Subscribe button. Happy coding!