Skip to content

Hotreload not working in .cshtml files while debugging UNLESS the project configuration is literally named "Debug" #43910

Closed
@alex-jitbit

Description

@alex-jitbit

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.

Metadata

Metadata

Assignees

Labels

✔️ Resolution: FixedThe bug or enhancement requested in this issue has been checked-in!Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-dotnetwatchThis issue is related to the dotnet-watch command-line tool (now external)feature-hot-reloadThis issue is related to the Hot Reload feaature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions