Skip to content

Upgrade projects to .NET 10 (System.IO)#12800

Merged
gewarren merged 2 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set14
Jun 26, 2026
Merged

Upgrade projects to .NET 10 (System.IO)#12800
gewarren merged 2 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set14

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Contributes to #12513.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the System.IO-related C# snippet projects to target .NET 10 so the snippets compile against a modern runtime as part of the broader snippet modernization work for #12513.

Changes:

  • Bumped many snippets/csharp/System.IO* projects from net6.0 (and a few older TFMs like net48/net4.8) to net10.0.
  • Updated Windows-specific snippet projects from net8.0-windows/net6.0-windows to net10.0-windows.

Reviewed changes

Copilot reviewed 118 out of 118 changed files in this pull request and generated no comments.

Show a summary per file
File Description
snippets/csharp/System.IO/StringReader/ReadToEnd/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StringReader/.ctor/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamWriter/Write/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamWriter/AutoFlush/system.IO.StreamWriter.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamReader/ReadToEnd/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamReader/ReadLine/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamReader/Peek/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/StreamReader/CurrentEncoding/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Stream/Read/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Stream/CopyTo/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Stream/CanWrite/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/TryJoin/tryjoin.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/IsPathRooted/ispathrooted.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/GetRelativePath/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/GetInvalidFileNameChars/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/GetFullPath/getfullpath.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/DirectorySeparatorChar/directoryseparatorchar.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/Combine/misc.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Path/ChangeExtension/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/MemoryStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileSystemWatcher/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileSystemInfo/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileSystemInfo/LastAccessTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileSystemAclExtensions/GetAccessControl/Project.csproj Bump TargetFramework to net10.0-windows.
snippets/csharp/System.IO/FileStreamOptions/FileStreamOptionsExamples.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileStream/Seek/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileStream/Read/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileStream/CanWrite/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileStream/CanSeek/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileStream/CanRead/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Replace/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/OpenWrite/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/OpenText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/OpenRead/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Name/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/MoveTo/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Length/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/IsReadOnly/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Exists/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/DirectoryName/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Directory/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Delete/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Decrypt/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/CreateText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/Create/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/AppendText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileInfo/.ctor/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/FileAttributes/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/SetLastWriteTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/SetLastAccessTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/Replace/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/OpenWrite/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/OpenText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/OpenRead/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/Move/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/GetLastWriteTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/GetLastAccessTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/GetAttributes/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/Exists/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/CreateText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/Copy/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/AppendText/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/File/AppendAllLines/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DriveInfo/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryNotFoundException/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Root/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Parent/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Name/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/MoveTo/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/GetFiles/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/GetDirectories/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/GetAccessControl/Project.csproj Bump TargetFramework to net10.0-windows.
snippets/csharp/System.IO/DirectoryInfo/Exists/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/EnumerateFiles/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Delete/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/CreateSubdirectory/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/Create/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/DirectoryInfo/.ctor/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/SetLastWriteTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/SetLastAccessTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/Overview/project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetLastWriteTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetLastAccessTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetFiles/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetDirectoryRoot/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetCurrentDirectory/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetCreationTimeUtc/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/GetCreationTime/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/Exists/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/EnumerateFiles/project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/Directory/CreateDirectory/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BufferedStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/ReadChars/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/ReadChar/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/ReadBytes/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/ReadByte/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/Overview/BinaryReaderWriter.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO/BinaryReader/BaseStream/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/PipeStream/Read/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/NamedPipeServerStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/NamedPipeServerStream/GetImpersonationUserName/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/NamedPipeClientStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/AnonymousPipeServerStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/AnonymousPipeClientStream/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Pipes/AnonymousPipeClientStream/.ctor/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Packaging/PackageStore/AddPackage/RmPackageViewer.csproj Bump TargetFramework to net10.0-windows.
snippets/csharp/System.IO.Packaging/EncryptedPackageEnvelope/Close/RmPackagePublish.csproj Bump TargetFramework to net10.0-windows.
snippets/csharp/System.IO.MemoryMappedFiles/MemoryMappedFile/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.MemoryMappedFiles/MemoryMappedFile/OpenExisting/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.IsolatedStorage/IsolatedStorageFile/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.IsolatedStorage/IsolatedStorageFile/Close/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Enumeration/FileSystemEnumerableTResult/Overview/Project.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Compression/GZip/GZip.csproj Bump TargetFramework to net10.0.
snippets/csharp/System.IO.Compression/Deflate/Deflate.csproj Bump TargetFramework to net10.0.

@gewarren gewarren marked this pull request as ready for review June 25, 2026 19:15
@gewarren gewarren requested a review from a team as a code owner June 25, 2026 19:15

@BillWagner BillWagner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM.

@gewarren gewarren merged commit e43fc5c into dotnet:main Jun 26, 2026
6 checks passed
@gewarren gewarren deleted the upgrade-csharp-set14 branch June 26, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants