aspnetcore: Hotreload not working in .cshtml files while debugging UNLESS the project configuration is literally named "Debug"
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I’ve spent MONTHS investigating this. Finally found the cause.
My project’s debug configuration is named FullDebug not the default Debug. But all the settings replicate a debugging config. Code optimizations are disabled, pdb-generation is enabled, I can successfully step through the code in VS2022, examine snapshots, call stacks etc. etc.
<Configurations>Full;Trial;FullCompany;FullSmall;FullDebug</Configurations>
<!--skipped some code-->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='FullDebug|AnyCPU'">
<DefineConstants>DEBUG;TRACE;FULL</DefineConstants>
</PropertyGroup>
But hot reload in Visual Studio is not working while debugging (F5), UNLESS MY CONFIGURATION IS LITERALLY NAMED “Debug”. Even though my FullDebug configuration mirrors Debug settings
As soon as I rename my configuration to “Debug” hot reload starts working again. What a nonsense.
Expected Behavior
Should work
.NET Version
6.0
Anything else?
Please don’t use magic strings.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 15 (9 by maintainers)
As far as I can tell the issue is fixed in VS 17.6 Preview 3. See also ticket https://developercommunity.visualstudio.com/t/Hot-reloading-not-work-as-expected-when/10270598.
@BluMichele Please open a new issue with a repro if it still doesn’t work for you.