I am having this frustrating problem. I change text in a razor view (cshtml), Start without Debugging
, refresh (Ctrl+F5) the browser but nothing happens. The strange part is that if I modify a controller's return value (say return Ok("test");
) or an included static file (like CSS), refresh, the change is visible. The razor view only updates if I stop start and stop debugging every time.
Here are things I have already tried:
- Made sure that
Detect when file is changed outside the environment
is checked.
On run, when projects are out of date
is Always build
.
- Tried this on Edge, Chrome and Firefox with and without hard refreshing.
- Restarting Visual Studio numeral times.
- Cleaning/rebuilding solution.
- Doing this on new template projects.
P.S. I see there are many similar questions, none of the answers, however, seem to fix my problem.
Update
This appears to be a problem on a much larger scale. If I:
- Create a required razor section in the parent view like this
@RenderSection("css", required: true)
.
- Not implement the rendering in the child view.
- I (obviously) get the
InvalidOperationException: The following sections have been defined but have not been rendered by the page at 'blalala':css
.
- Then I implement it.
- Save, Ctrl+F5 in Firefox. The error persists.
At this point, VS 2015 is practically unusable because you don't know, if you're actually missing something or it's VS acting out
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…