Upgrade WPF projects to .NET 10 - #12922
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes a set of WPF snippet projects under snippets/xaml/VS_Snippets_Wpf by converting legacy .NET Framework-style .csproj files to SDK-style projects and updating them to target .NET 10 (net10.0-windows), supporting the broader snippet modernization effort in #12713.
Changes:
- Convert multiple WPF snippet
.csprojfiles from legacy MSBuild format to SDK-style (Microsoft.NET.Sdk). - Upgrade target framework from .NET Framework 4.8 to
.NET 10(net10.0-windows) and enable WPF via<UseWPF>true</UseWPF>. - Simplify project item declarations (XAML items, resources, and generated resource/settings files).
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj | SDK-style conversion; target net10.0-windows for WrapPanel sample. |
| snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj | SDK-style conversion; target net10.0-windows and keep icon resources. |
| snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj | SDK-style conversion; target net10.0-windows for VisualBrush sample. |
| snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj | SDK-style conversion; target net10.0-windows for Thickness sample. |
| snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj | SDK-style conversion; target net10.0-windows and keep image resource. |
| snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj | SDK-style conversion; target net10.0-windows with explicit XAML/code/resource items. |
| snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj | SDK-style conversion; target net10.0-windows for ScrollViewer sample. |
| snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj | SDK-style conversion; target net10.0-windows and preserve resx/settings generation wiring. |
| snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj | SDK-style conversion; target net10.0-windows and preserve resx/settings generation wiring. |
| snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj | SDK-style conversion; target net10.0-windows for MPA layout sample. |
| snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj | SDK-style conversion; target net10.0-windows for margin/padding/alignment sample. |
| snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj | SDK-style conversion; target net10.0-windows for LayoutTransform sample. |
| snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj | SDK-style conversion; target net10.0-windows for keyframes sample, keeping pages/resources. |
| snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj | SDK-style conversion; target net10.0-windows for Grid overview sample. |
| snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj | SDK-style conversion; target net10.0-windows for gradient brush examples. |
| snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj | SDK-style conversion; target net10.0-windows for geometries misc snippets. |
| snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj | SDK-style conversion; target net10.0-windows and preserve resource/settings file wiring. |
| snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj | SDK-style conversion; target net10.0-windows for drawing misc snippets. |
| snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj | SDK-style conversion; target net10.0-windows for DockPanel overview sample. |
| snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj | SDK-style conversion; target net10.0-windows with explicit XAML/code/resource items. |
| snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj | SDK-style conversion; target net10.0-windows for DatePicker snippets. |
| snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj | SDK-style conversion; target net10.0-windows for DataTemplating intro sample. |
| snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj | SDK-style conversion; target net10.0-windows and set RootNamespace. |
| snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj | SDK-style conversion; target net10.0-windows for Canvas overview sample. |
| snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj | SDK-style conversion; target net10.0-windows for Calendar snippets. |
| snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj | SDK-style conversion; target net10.0-windows for brush overview examples. |
| snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj | SDK-style conversion; target net10.0-windows for Brushes introduction sample. |
| snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj | SDK-style conversion; target net10.0-windows for Basic3D blank sample. |
| snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj | SDK-style conversion; target net10.0-windows and preserve resource/settings generation wiring. |
| snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj | SDK-style conversion; target net10.0-windows for storyboard animation sample. |
Suppressed comments (1)
snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj:22
BlankSample.csprojcontains two identical<Generator>MSBuild:Compile</Generator>elements under theWindow1.xamlPageitem. Keep a single generator entry.
<Page Include="Window1.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
Removed duplicate Generator entries for ApplicationDefinition and Page.
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.