From fc6cb118803558201976cbd4332905258d79baa4 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Tue, 6 Jan 2026 16:26:06 +0100 Subject: [PATCH] Update to .net 10 --- .../Launch/BlazorHostWindow.xaml | 2 +- .../Launch/BlazorHostWindow.xaml.cs | 7 ++-- WpfExtended.Blazor/WpfExtended.Blazor.csproj | 32 +++++++++++++++---- .../WpfExtended.SourceGeneration.csproj | 8 ++--- WpfExtended.Test/WpfExtended.Tests.csproj | 16 +++++----- WpfExtended/WpfExtended.csproj | 8 ++--- 6 files changed, 48 insertions(+), 25 deletions(-) diff --git a/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml b/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml index a234b94..ffe1e4d 100644 --- a/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml +++ b/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml @@ -2,7 +2,7 @@ x:Class="WpfExtended.Blazor.Launch.BlazorHostWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:blazor="http://schemas.microsoft.com/winfx/2006/xaml/presentation/blazor" + xmlns:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WpfExtended.Blazor.Launch" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" diff --git a/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml.cs b/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml.cs index f1c7c68..8aa916a 100644 --- a/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml.cs +++ b/WpfExtended.Blazor/Launch/BlazorHostWindow.xaml.cs @@ -95,7 +95,7 @@ public partial class BlazorHostWindow : Window private void BlazorWebView_BlazorWebViewInitialized(object? sender, BlazorWebViewInitializedEventArgs args) { - this.BlazorWebView.WebView.CoreWebView2InitializationCompleted += this.CoreWebView2_InitializationCompleted; + args.WebView.CoreWebView2InitializationCompleted += this.CoreWebView2_InitializationCompleted; this.BlazorWebViewInitialized?.Invoke(this, args); } @@ -113,6 +113,9 @@ public partial class BlazorHostWindow : Window return; } - this.CoreWebView2Initialized?.Invoke(this, this.BlazorWebView.WebView.CoreWebView2); + if (sender is Microsoft.Web.WebView2.Wpf.WebView2 webView2) + { + this.CoreWebView2Initialized?.Invoke(this, webView2.CoreWebView2); + } } } diff --git a/WpfExtended.Blazor/WpfExtended.Blazor.csproj b/WpfExtended.Blazor/WpfExtended.Blazor.csproj index 48abd85..77e7f9c 100644 --- a/WpfExtended.Blazor/WpfExtended.Blazor.csproj +++ b/WpfExtended.Blazor/WpfExtended.Blazor.csproj @@ -1,10 +1,10 @@  - net9.0-windows + net10.0-windows10.0.17763.0 true true - 0.8.1 + 0.9.0 enable latest @@ -12,16 +12,36 @@ Alexandru Macocian https://github.com/AlexMacocian/WpfExtended + + + Default + false + false + false + true + false + + + + <_PackageFiles Remove="@(_PackageFiles)" + Condition="'%(Identity)' != '' And $([System.String]::new('%(Identity)').Contains('StaticWebAssets'))" /> + <_PackageFiles Remove="@(_PackageFiles)" + Condition="'%(Identity)' != '' And $([System.String]::new('%(Identity)').EndsWith('.props'))" /> + <_PackageFiles Remove="@(_PackageFiles)" + Condition="'%(Identity)' != '' And $([System.String]::new('%(Identity)').EndsWith('.targets'))" /> + + + - - - + + + - + \ No newline at end of file diff --git a/WpfExtended.SourceGeneration/WpfExtended.SourceGeneration.csproj b/WpfExtended.SourceGeneration/WpfExtended.SourceGeneration.csproj index 5b40ee8..f119ae7 100644 --- a/WpfExtended.SourceGeneration/WpfExtended.SourceGeneration.csproj +++ b/WpfExtended.SourceGeneration/WpfExtended.SourceGeneration.csproj @@ -7,7 +7,7 @@ Alexandru Macocian Source generator library. LICENSE - 0.3.0 + 0.3.1 latest true true @@ -16,11 +16,11 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/WpfExtended.Test/WpfExtended.Tests.csproj b/WpfExtended.Test/WpfExtended.Tests.csproj index 38cb2ce..e8982f7 100644 --- a/WpfExtended.Test/WpfExtended.Tests.csproj +++ b/WpfExtended.Test/WpfExtended.Tests.csproj @@ -2,20 +2,20 @@ Library - net9.0-windows + net10.0-windows true WpfExtended.Tests.Launcher - - - - - - - + + + + + + + diff --git a/WpfExtended/WpfExtended.csproj b/WpfExtended/WpfExtended.csproj index 5ead65b..b44d1da 100644 --- a/WpfExtended/WpfExtended.csproj +++ b/WpfExtended/WpfExtended.csproj @@ -1,10 +1,10 @@  - net9.0-windows + net10.0-windows true true - 0.8.1 + 0.9.0 latest Extension library for Windows Presentation Platform. @@ -83,8 +83,8 @@ http://www.java2s.com/Open-Source/CSharp_Free_Code/Windows_Presentation_Foundati - - + +