Closed Junjun-zhao closed 1 week ago
Hi @marcpopMSFT @tmat , could you please take a look at this issue? Thanks.
Adding @mkArtakMSFT per https://github.com/dotnet/sdk/blob/main/CODEOWNERS#L74
Thanks @marcpopMSFT.
@mkArtakMSFT @arkalyanms @tmat Could you please take a look at this issue? We are in progress of RC1 validation windows. This also reproduces on the latest RC1 build dotnet-sdk-9.0.100-rc.1.24422.10.
Could you help confirm whether this is expected? If yes, is this a breaking change?
@tmat, it looks like prior to the change here, the default behavior for apps targeting .NET 5 was to restart the app when a change was made. I guess the default is now that dotnet watch
performs hot reload-based watching, but this does not work in .NET 5 apps.
Would we be able to fix this for .NET 5 so that the default is not hot reload-based watching?
Yes, we can fix it. The workaround is to pass --no-hot-reload
.
@tmat is the plan here to provide a fix in the RC2 timeframe?
Should we otherwise update the scenario to target only .NET 6.0 and newer apps?
I think we should update the scenario to target .NET 6 app since .NET 5 is not supported anymore.
Ok. We will update the test scenario for this. Will this be going to be documented as a breaking change?
@tmat sounds good to me, let's have the scenario updated to target 6.0 and call it a day.
@Junjun-zhao I don't think we'll have to document this as a breaking change as 5.0 is no longer supported.
Application Name: Global - tools OS: Windows 10 21H2 CPU: X64 .NET Build Number: dotnet-sdk-9.0.100-rc.1.24413.1 App & Source checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2220902
Verify Scenarios: 1). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-rc.1.24413.1: Fail 2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-rc.1.24409.1: Pass 3). Windows 10 21H2 AMD64 + dotnet-sdk-6.0.425-win-x64: Pass
Description : When run command "dotnet watch run" for a .NET 5.0 APP with the latest .NET 9 build "dotnet-sdk-9.0.100-rc.1.24413.1", it will be throws error "
Hot Reload based watching is only supported in .NET 6.0 or newer apps. Update the project's launchSettings.json to disable this feature
" . We found it should be related the commit Implement support for multi-process Hot Reload (#41324) · dotnet/sdk@8d0a68e · GitHub. Could you help confirm whether this is expected? If Yes, is this a breaking change?Repro Steps: (Demo Attatted:DotNETCoreConsole.zip) 1.Go to ...\DotNETCoreConsole\DotNETCoreConsole. 2.Execute command :
dotnet watch run
.Expected Result: Run successfully and show "Hello World!".
Actual Result: Show error:
Hot Reload based watching is only supported in .NET 6.0 or newer apps. Update the project's launchSettings.json to disable this feature
.Findings : If retarget the app to .NET 6.0 or higher, error will go.
Dotnet Info:
@dotnet-actwx-bot @dotnet/compat