Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload still not working for cshtml #39508

Closed
1 task done
IndigoHealth opened this issue Jan 14, 2022 · 6 comments
Closed
1 task done

Hot reload still not working for cshtml #39508

IndigoHealth opened this issue Jan 14, 2022 · 6 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-hot-reload This issue is related to the Hot Reload feaature ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@IndigoHealth
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Changing and saving code in a cshtml does not affect the HTML displayed in the debug session browser window. This seems to be the same issue as issue #36098, which appears to be closed/resolved.

Expected Behavior

If I run an ASP.Net MVC (net5.0) app under debug and I change the cshtml view code for the current page, the changes should be visible on that page.

Steps To Reproduce

  • Create new ASP.NET Core Web App targeting net5.0
  • F5
  • Open index.cshtml, change the welcome text, and save the changes.

Expected Behavior:
Welcome text changes

Actual Behavior:
Welcome text does not change

Other things I've tried

  • Set Hot Reload on File Save (under the Hot Reload button on the VS toolbar)
  • Click the Hot Reload button on the VS toolbar
  • Reload the web page in the browser

Exceptions (if any)

No response

.NET Version

6.0.101

Anything else?

Visual Studio version:
Microsoft Visual Studio Professional 2022 (64-bit)
Version 17.0.5

@TanayParikh TanayParikh added ✔️ Resolution: Duplicate Resolved as a duplicate of another issue area-blazor Includes: Blazor, Razor Components feature-hot-reload This issue is related to the Hot Reload feaature labels Jan 14, 2022
@ghost ghost added the Status: Resolved label Jan 14, 2022
@TanayParikh
Copy link
Contributor

Hello @sbsw, thanks for contacting us. This issue is being discussed here: #38809

Closing this out as a duplicate.

@IndigoHealth
Copy link
Author

Hello @TanayParikh, issue #38809 seems to be all about projects that include Blazor. This is just a vanilla ASP.NET Core MVC app.

@SteveSandersonMS
Copy link
Member

@sbsw I'm afraid hot reload requires .NET 6 (so, target net6.0).

@IndigoHealth
Copy link
Author

hot reload requires .NET 6 (so, target net6.0)

That gem of wisdom is seriously not obvious. Now that the UI has a "hot reload" button, something in the vicinity of that button needs to look at the project(s) and prominently warn if some project settings (such as the target) need to be changed for Hot Reload to actually work.

@TanayParikh
Copy link
Contributor

TanayParikh commented Jan 14, 2022

Thanks for the feedback @sbsw. Would you mind filling a VS issue (Report a Problem dialog in VS) with that feedback so it may be directed to the appropriate team.

@ghost
Copy link

ghost commented Jan 15, 2022

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.

@ghost ghost closed this as completed Jan 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 15, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-hot-reload This issue is related to the Hot Reload feaature ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants