From 609d1c6ee121e1059ebfa76e58e7e66ae8983b82 Mon Sep 17 00:00:00 2001 From: James McMahon Date: Thu, 17 Sep 2026 10:45:20 -0500 Subject: [PATCH 1/5] Revert ".net 9 is probably not what is meant here, given that this is a 7 to 8 breaking changes doc (#41275)" This reverts commit e86e91508fcbf65709ed40eea5442d6cf61a689c. This change was incorrect, the breaking change behavior introduced in 9. Evidence: - dotnet/runtime#94587 introduced the change on 2023-11-27 and was assigned to the 9.0.0 milestone: https://github.com/dotnet/runtime/pull/94587 - The runtime commit adds Windows-specific handling for bare drive paths and the WindowsRelativeToCurrentDrivePath regression test. The test expects C:foo rather than C:\foo: https://github.com/dotnet/runtime/commit/1af39632fe66a25c3ef86ff71cd3bbe9a9c34624 - The .NET 8.0.0 and 8.0.31 sources still call Path.Join directly: https://github.com/dotnet/runtime/blob/v8.0.0/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEntry.cs#L38-L42 https://github.com/dotnet/runtime/blob/v8.0.31/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEntry.cs#L38-L42 - The new Windows handling is present in .NET 9 Preview 1 and 9.0.0: https://github.com/dotnet/runtime/blob/v9.0.0-preview.1.24080.9/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEntry.Windows.cs#L79-L90 https://github.com/dotnet/runtime/blob/v9.0.0/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEntry.Windows.cs#L79-L90 - The documentation previously said ".NET 9 and later versions". The following commit changed it to ".NET 8" based on the document's placement in the .NET 8 breaking changes folder: https://github.com/dotnet/docs/commit/e86e91508fcbf65709ed40eea5442d6cf61a689c --- .../compatibility/core-libraries/8.0/drive-current-dir-paths.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md b/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md index f0bddbcadb908..3f400ad0d550d 100644 --- a/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md +++ b/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md @@ -39,7 +39,7 @@ C:\Program.cs ## New behavior -Running the same code snippet in .NET 8 and later versions produces output without a separator character in each path. +Running the same code snippet in .NET 9 and later versions produces output without a separator character in each path. ```output Full path of "C:" is C:\Users\myalias\consoleapps\Program. From 1c351ba49984f4df103033e0f933de6d92894dad Mon Sep 17 00:00:00 2001 From: James McMahon Date: Fri, 18 Sep 2026 11:46:26 -0500 Subject: [PATCH 2/5] Move drive path breaking change to .NET 9 --- docs/core/compatibility/8.0.md | 1 - docs/core/compatibility/9.0.md | 1 + .../core-libraries/{8.0 => 9.0}/drive-current-dir-paths.md | 4 ++-- docs/core/compatibility/toc.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename docs/core/compatibility/core-libraries/{8.0 => 9.0}/drive-current-dir-paths.md (97%) diff --git a/docs/core/compatibility/8.0.md b/docs/core/compatibility/8.0.md index 61f1d47a9f262..61b0f13a28538 100644 --- a/docs/core/compatibility/8.0.md +++ b/docs/core/compatibility/8.0.md @@ -38,7 +38,6 @@ See [Breaking changes in ASP.NET Core 8](/aspnet/core/breaking-changes/8/overvie | [Base64.DecodeFromUtf8 methods ignore whitespace](core-libraries/8.0/decodefromutf8-whitespace.md) | Behavioral change | | [Boolean-backed enum type support removed](core-libraries/8.0/bool-backed-enum.md) | Behavioral change | | [Complex.ToString format changed to ``](core-libraries/8.0/complex-format.md) | Behavioral change | -| [Drive's current directory path enumeration](core-libraries/8.0/drive-current-dir-paths.md) | Behavioral change | | [Enumerable.Sum throws new OverflowException for some inputs](core-libraries/8.0/enumerable-sum.md) | Behavioral change | | [FileStream writes when pipe is closed](core-libraries/8.0/filestream-disposed-pipe.md) | Behavioral change | | [FindSystemTimeZoneById doesn't return new object](core-libraries/8.0/timezoneinfo-object.md) | Behavioral change | diff --git a/docs/core/compatibility/9.0.md b/docs/core/compatibility/9.0.md index 98a7ca278b8f4..154ba8d1a19c3 100644 --- a/docs/core/compatibility/9.0.md +++ b/docs/core/compatibility/9.0.md @@ -35,6 +35,7 @@ See [Breaking changes in ASP.NET Core 9](/aspnet/core/breaking-changes/9/overvie | [C# overload resolution prefers `params` span-type overloads](core-libraries/9.0/params-overloads.md) | Source incompatible | | | [Creating type of array of System.Void not allowed](core-libraries/9.0/type-instance.md) | Behavioral change | Preview 1 | | [Default `Equals()` and `GetHashCode()` throw for types marked with `InlineArrayAttribute`](core-libraries/9.0/inlinearrayattribute.md) | Behavioral change | Preview 6 | +| [Drive's current directory path enumeration](core-libraries/9.0/drive-current-dir-paths.md) | Behavioral change | Preview 1 | | [EnumConverter validates registered types to be enum](core-libraries/9.0/enumconverter.md) | Behavioral change | Preview 7 | | [FromKeyedServicesAttribute no longer injects non-keyed parameter](core-libraries/9.0/non-keyed-params.md) | Behavioral change | RC 1 | | [IncrementingPollingCounter initial callback is asynchronous](core-libraries/9.0/async-callback.md) | Behavioral change | RC 1 | diff --git a/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md b/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md similarity index 97% rename from docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md rename to docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md index 3f400ad0d550d..61abe91761981 100644 --- a/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md +++ b/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md @@ -1,6 +1,6 @@ --- title: "Breaking change: Drive's current directory path enumeration" -description: Learn about the .NET 8 breaking change in core .NET libraries where files are enumerated without a separator after the path when the path is the drive's current directory. +description: Learn about the .NET 9 breaking change in core .NET libraries where files are enumerated without a separator after the path when the path is the drive's current directory. ms.date: 02/09/2024 --- # Drive's current directory path enumeration @@ -54,7 +54,7 @@ C:Program.cs ## Version introduced -.NET 8 +.NET 9 Preview 1 ## Type of breaking change diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index ae2ba113163ab..4b7ff711ce731 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -336,6 +336,8 @@ items: href: core-libraries/9.0/params-overloads.md - name: Creating type of array of System.Void not allowed href: core-libraries/9.0/type-instance.md + - name: Drive's current directory path enumeration + href: core-libraries/9.0/drive-current-dir-paths.md - name: EnumConverter validates registered types to be enum href: core-libraries/9.0/enumconverter.md - name: "`Equals`/`GetHashCode` throw for `InlineArrayAttribute` types" @@ -492,8 +494,6 @@ items: href: core-libraries/8.0/bool-backed-enum.md - name: Complex.ToString format changed to `` href: core-libraries/8.0/complex-format.md - - name: Drive's current directory path enumeration - href: core-libraries/8.0/drive-current-dir-paths.md - name: Enumerable.Sum throws new OverflowException for some inputs href: core-libraries/8.0/enumerable-sum.md - name: FileStream writes when pipe is closed From ac26d31df58e34e17e98bed63a8016aaaf0fc545 Mon Sep 17 00:00:00 2001 From: suitejames Date: Fri, 18 Sep 2026 11:54:10 -0500 Subject: [PATCH 3/5] Update docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../compatibility/core-libraries/9.0/drive-current-dir-paths.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md b/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md index 61abe91761981..0241cef28c49e 100644 --- a/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md +++ b/docs/core/compatibility/core-libraries/9.0/drive-current-dir-paths.md @@ -54,7 +54,7 @@ C:Program.cs ## Version introduced -.NET 9 Preview 1 +.NET 9 ## Type of breaking change From d7daafb60c525c53942d5c8f7f7e372ea2988d55 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 18 Sep 2026 20:26:51 -0700 Subject: [PATCH 4/5] Add redirect for drive current dir paths to 9.0 --- .openpublishing.redirection.core.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index 0bf161a99e6cf..be64237543791 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -494,6 +494,10 @@ "source_path_from_root": "/docs/core/compatibility/core-libraries/8.0/indexofanyvalues-renamed.md", "redirect_url": "/dotnet/core/compatibility/8.0" }, + { + "source_path_from_root": "/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md", + "redirect_url": "/dotnet/core/compatibility/core-libraries/9.0/drive-current-dir-paths" + } { "source_path_from_root": "/docs/core/compatibility/core-libraries/8.0/optimizeforreading-arg.md", "redirect_url": "/dotnet/core/compatibility/8.0" From 99a7a15393b083a7ed6821e35fd23de2fc9eae36 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 18 Sep 2026 20:33:52 -0700 Subject: [PATCH 5/5] Apply suggestion from @gewarren --- .openpublishing.redirection.core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index be64237543791..da503540e5c17 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -497,7 +497,7 @@ { "source_path_from_root": "/docs/core/compatibility/core-libraries/8.0/drive-current-dir-paths.md", "redirect_url": "/dotnet/core/compatibility/core-libraries/9.0/drive-current-dir-paths" - } + }, { "source_path_from_root": "/docs/core/compatibility/core-libraries/8.0/optimizeforreading-arg.md", "redirect_url": "/dotnet/core/compatibility/8.0"