0

I'm stuck at the beginning of the ASP.NET Core tutorial with VS Code : https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/start-mvc?view=aspnetcore-8.0&tabs=visual-studio-code

I'm at the step where we ask me to run the application. It works fine. But just after, it says :

  • Make code changes.
  • Save the file.
  • Quickly refresh the browser and see the code changes.

It does not work for me. I do launch without the debugger, with Ctrl+F5, or by going to "Run > Run WithoutDebugging". And if I make a code change (just changing some text) and refresh my browser, I don't see the change.

What could I have done wrong?

1 Answer 1

2

I have followed the same steps and able to reproduce the issue. I have noticed that in the VS we have the extension which is called "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" and by using that and VS also provide hot reload option by using that you can see the changes in the browser without restarting the project.

In VS code you can open the terminal and run command "dotnet watch run" which will provide you similar functionality.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.