Apply Code Changes button not working in Visual Studio 2019

Joe Green 146 Reputation points
2021-10-12T17:20:33.603+00:00

In Visual Studio 2019, 'Apply Code Changes' button next to Continue doesn't work when running asp.Net core web application using IIS Express on devlopment machine. Am I missing some setting in Visual Studio 2019?

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | Visual Studio | Debugging
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PengGe-MSFT 3,381 Reputation points
    2021-10-13T07:03:50.897+00:00

    Hi, @Joe Green

    Welcome to Microsoft Q&A!

    What type of code did you modify? Hot reload supports modify your apps managed source code while the application is running.

    To try Hot Reload in Visual Studio when using the debugger:

    Download and install Visual Studio 2019 version 16.11 Preview 1
    Open a supported project type, for example a WPF app
    Launch the app with the debugger attached through F5 (make sure that “enable native code debugging” is disabled in debugger settings/debug launch profile)
    Open a C# code file with some code that can be re-executed through the running apps user interface (example: code-behind of a button or a ViewModel’s command) or something that is being triggered at an interval through a timer and change the code
    Apply the code changes using the new apply code changes (ALT-F10) button in your Visual Studio toolbar (next to the Continue button). Note that saving the files is not required when using Visual Studio, giving you the flexibility to quickly change code and keep going.

    You can refer to this blog.

    Sincerely,
    Peng
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.