Search code examples
visual-studioresharpervisual-studio-2022coderush

How to save changes and build using a single key stroke in Visual Studio 2022?


I have F1 mapped to Save.AllFiles. In VS 2019 I used to use a VS extension called BuildOnSave which would build the solution upon saving. There's no version of it for VS 2022.

In VS 2022 I have one function key to save and another to build. The build then invokes the hot reload which is my goal to see the changes in the webpage in an ASP.NET Core app.

I tried using the RunOnSave extension and I couldn't get it to do what I wanted.

Is there a way to use just a single keystroke to save and build? I have R# and CodeRush if there's a way to do this in one of them.


Solution

  • Simply build the solution - it automatically saves all changed files.