Upgrade projects to .NET 10 - #12921
Open
gewarren wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates a set of C# snippet projects to modern SDK-style project files targeting .NET 10, aligning with the “Modernize all C# code snippets” effort in #12713.
Changes:
- Converted legacy, non-SDK-style
.csprojfiles to SDK-style projects and updated TFMs tonet10.0/net10.0-windows. - Added Windows Desktop settings (
UseWPF,UseWindowsForms) and a few required package references for desktop/snippet compilation. - Tightened project item inclusion via
EnableDefault*Itemsand explicit<Compile/>/ resource item lists.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| snippets/csharp/System/String/Overview/instantiate1.csproj | Migrate to SDK-style and target net10.0 for the String instantiation snippet project. |
| snippets/csharp/System/IObservableT/Overview/locationtrackercs.csproj | Migrate to SDK-style and target net10.0 for the IObservable snippet project. |
| snippets/csharp/System/IntPtr/ToPointer/example.csproj | Migrate to SDK-style and target net10.0 for IntPtr.ToPointer snippet project. |
| snippets/csharp/System/IntPtr/Overview/example.csproj | Migrate to SDK-style and target net10.0 for IntPtr overview snippet project. |
| snippets/csharp/System/Exception/Overview/customexceptioncs.csproj | Migrate to SDK-style and target net10.0 for custom exception snippet project. |
| snippets/csharp/System/Convert/IsDBNull/IsDBNull_To_NA_CS.csproj | Migrate to SDK-style, target net10.0-windows, and modernize WinForms/resource items + SqlClient reference. |
| snippets/csharp/System/Console/Overview/setfont1.csproj | Migrate to SDK-style and target net10.0 for Console set font snippet project. |
| snippets/csharp/System.Timers/Timer/SynchronizingObject/SynchronizingObjectCS1.csproj | Migrate to SDK-style, target net10.0-windows, and set WinForms-related properties. |
| snippets/csharp/System.Text.RegularExpressions/Regex/CompileToAssembly/compiletoassembly1.csproj | Migrate to SDK-style and target net10.0 for regex compile-to-assembly snippet project. |
| snippets/csharp/System.Security/SecureString/.ctor/securestringctor.csproj | Migrate to SDK-style and target net10.0 for SecureString ctor snippet project. |
| snippets/csharp/System.Runtime.InteropServices/SafeHandle/Overview/safehandle.csproj | Migrate to SDK-style, target net10.0, and add required permissions package reference. |
| snippets/csharp/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute/Overview/fixedaddress.csproj | Migrate to SDK-style and target net10.0 for FixedAddressValueTypeAttribute snippet project. |
| snippets/csharp/System.Printing/PrintServer/Overview/PrintServerCreate.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for System.Printing sample compilation. |
| snippets/csharp/System.Printing/PrintQueue/HasPaperProblem/PrinterStatusSurvey.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for System.Printing sample compilation. |
| snippets/csharp/System.Printing/PrintQueue/Commit/Management_PrintTicket.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for print ticket sample compilation. |
| snippets/csharp/System.Printing/PrintJobStatus/Overview/DiagnoseProblematicPrintJob.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for print job status sample compilation. |
| snippets/csharp/System.Printing/LocalPrintServer/GetDefaultPrintQueue/GetPrintObjectPropertiesWithoutReflection.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for local print server sample compilation. |
| snippets/csharp/System.Printing/LocalPrintServer/.ctor/ClonePrinter.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for local print server sample compilation. |
| snippets/csharp/System.Printing/EnumeratedPrintQueueTypes/Overview/EnumerateSubsetOfPrintQueues.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for print queue enumeration sample compilation. |
| snippets/csharp/System.Printing/Collation/Overview/XpsCreate.csproj | Migrate to SDK-style, target net10.0-windows, and enable WinForms/WPF for XPS creation sample compilation. |
| snippets/csharp/System.IO/StreamWriter/Overview/streamreadwrite.csproj | Migrate to SDK-style and target net10.0 for StreamWriter read/write snippet project. |
| snippets/csharp/System.IO.Packaging/Package/Overview/PackageWrite.csproj | Migrate to SDK-style, target net10.0-windows, enable WPF, and explicitly include content assets. |
| snippets/csharp/System.IO.Packaging/Package/GetPart/PackageRead.csproj | Migrate to SDK-style, target net10.0-windows, and enable WPF for package read snippet project. |
| snippets/csharp/System.IO.Packaging/CertificateEmbeddingOption/Overview/PackageDigitalSignature.csproj | Migrate to SDK-style, target net10.0-windows, enable WPF, and explicitly include content assets. |
| snippets/csharp/System.ComponentModel.Composition/ExportAttribute/consoleapplication3.csproj | Migrate to SDK-style, target net10.0, and add System.ComponentModel.Composition package reference. |
| snippets/csharp/System.ComponentModel.Composition.Hosting/DirectoryCatalog/consoleapplication7/consoleapplication7.csproj | Migrate to SDK-style, target net10.0, add package reference, and simplify project reference. |
| snippets/csharp/System.ComponentModel.Composition.Hosting/DirectoryCatalog/classlibrary1/classlibrary1.csproj | Migrate to SDK-style, target net10.0, and add System.ComponentModel.Composition package reference. |
| snippets/csharp/System.ComponentModel.Composition.Hosting/CompositionContainer/Overview/consoleapplication1.csproj | Migrate to SDK-style, target net10.0, and add System.ComponentModel.Composition package reference. |
| snippets/csharp/System.ComponentModel.Composition.Hosting/CompositionContainer/Compose/consoleapplication5.csproj | Migrate to SDK-style, target net10.0, and add System.ComponentModel.Composition package reference. |
| snippets/csharp/System.Collections.ObjectModel/ObservableCollectionT/BlockReentrancy/ObservableCollection.csproj | Migrate to SDK-style, target net10.0-windows, enable WPF, and explicitly list WPF items. |
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
gewarren
commented
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #12713.