Skip to content

Commit 74cc073

Browse files
tmatgewarren
andauthored
Document dotnet-watch breaking change (#43214)
* Document dotnet-watch breaking change * add to toc and overview page --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent 3eaf287 commit 74cc073

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

docs/core/compatibility/9.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
9595

9696
| Title | Type of change | Introduced version |
9797
|-------------------------------------------------------------------------------|-------------------|--------------------|
98+
| [`dotnet watch` incompatible with Hot Reload for old frameworks](sdk/9.0/dotnet-watch.md) | Behavioral change | RC 1 |
9899
| [`dotnet workload` commands output change](sdk/9.0/dotnet-workload-output.md) | Behavioral change | Preview 1 |
99100
| [`installer` repo version no longer documented](sdk/9.0/productcommits-versions.md) | Behavioral change | Preview 5 |
100101
| [Terminal logger is default](sdk/9.0/terminal-logger.md) | Behavioral change | Preview 1 |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Breaking change: 'dotnet watch' incompatible with Hot Reload for old frameworks"
3+
description: Learn about a breaking change in the .NET 9 SDK where 'dotnet watch' requires disabling Hot Reload for projects targeting .NET 5 or earlier.
4+
ms.date: 11/08/2024
5+
---
6+
# 'dotnet watch' incompatible with Hot Reload for old frameworks
7+
8+
.NET 9 introduces a change that requires [`dotnet watch`](../../../tools/dotnet-watch.md) to launched with Hot Reload disabled for projects targeting .NET 5 or earlier versions.
9+
10+
## Previous behavior
11+
12+
Previously, [`dotnet watch`](../../../tools/dotnet-watch.md) automatically disabled Hot Reload when used with projects targeting .NET 5 or earlier.
13+
14+
## New behavior
15+
16+
Starting in .NET 9, an error is reported when [`dotnet watch`](../../../tools/dotnet-watch.md) is launched without `--no-hot-reload` for projects targeting .NET 5 or earlier versions. The error is similar to:
17+
18+
> Hot Reload based watching is only supported in .NET 6.0 or newer apps.
19+
20+
## Version introduced
21+
22+
.NET 9 RC 1
23+
24+
## Type of breaking change
25+
26+
This change is a [behavioral change](../../categories.md#behavioral-change).
27+
28+
## Reason for change
29+
30+
The internal architecture of the `dotnet watch` tool underwent significant improvements. Preserving behavior for out-of-support .NET versions did not warrant increasing the complexity of the new implementation.
31+
32+
## Recommended action
33+
34+
Pass `--no-hot-reload` to `dotnet watch` on the command line, or update your project to target `net6.0` or later (using the `TargetFramework` property).
35+
36+
## Affected APIs
37+
38+
N/A

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ items:
9494
href: networking/9.0/query-redaction-logs.md
9595
- name: SDK and MSBuild
9696
items:
97+
- name: "`dotnet watch` incompatible with Hot Reload for old frameworks"
98+
href: sdk/9.0/dotnet-watch.md
9799
- name: "'dotnet workload' commands output change"
98100
href: sdk/9.0/dotnet-workload-output.md
99101
- name: "'installer' repo version no longer documented"
@@ -1770,6 +1772,8 @@ items:
17701772
items:
17711773
- name: .NET 9
17721774
items:
1775+
- name: "`dotnet watch` incompatible with Hot Reload for old frameworks"
1776+
href: sdk/9.0/dotnet-watch.md
17731777
- name: "'dotnet workload' commands output change"
17741778
href: sdk/9.0/dotnet-workload-output.md
17751779
- name: "'installer' repo version no longer documented"

0 commit comments

Comments
 (0)