From 76a69ad0201c6e38ec57dec41cdcb704a5f8aacc Mon Sep 17 00:00:00 2001 From: Nick Randolph Date: Wed, 13 Mar 2024 18:58:46 +1100 Subject: [PATCH 1/3] chore: Updating packages and workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/5689 --- testing/TestHarness/Directory.Packages.props | 5 +-- .../TestHarness.Windows.csproj | 32 ++++++++++++++++++- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/testing/TestHarness/Directory.Packages.props b/testing/TestHarness/Directory.Packages.props index 07ead00ae3..c58edf7d0c 100644 --- a/testing/TestHarness/Directory.Packages.props +++ b/testing/TestHarness/Directory.Packages.props @@ -17,9 +17,10 @@ - + + - + diff --git a/testing/TestHarness/TestHarness.Windows/TestHarness.Windows.csproj b/testing/TestHarness/TestHarness.Windows/TestHarness.Windows.csproj index c665838569..1eab469d02 100644 --- a/testing/TestHarness/TestHarness.Windows/TestHarness.Windows.csproj +++ b/testing/TestHarness/TestHarness.Windows/TestHarness.Windows.csproj @@ -13,7 +13,7 @@ en true - false + true @@ -41,6 +41,7 @@ + @@ -94,4 +95,33 @@ + + + + + + <_WebView2CoreFilesToExclude Include="@(ResolvedFileToPublish)" Condition="'%(Filename)' == 'Microsoft.Web.WebView2.Core'"/> + + + <_WebView2CoreFilesToExclude Remove="@(_WebView2CoreFilesToExclude)" Condition="$([System.String]::Copy(%(FullPath)).Contains('.nuget'))"/> + + + + + + + + + <_WebView2CoreOutputsToExclude Include="@(PackagingOutputs)" Condition="'%(Filename)' == 'Microsoft.Web.WebView2.Core'"/> + + + <_WebView2CoreOutputsToExclude Remove="@(_WebView2CoreOutputsToExclude)" Condition="$([System.String]::Copy(%(FullPath)).Contains('.nuget'))"/> + + + + From 4a258527e5490509ca270b9d543c8f1a9550e4a6 Mon Sep 17 00:00:00 2001 From: Nick Randolph Date: Wed, 13 Mar 2024 18:58:59 +1100 Subject: [PATCH 2/3] chore: Adding multiple settings --- .../Authentication/Web/WebAuthenticationSettingsHostInit.cs | 3 ++- .../Ext/Authentication/Web/appsettings.webauthsettings.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/WebAuthenticationSettingsHostInit.cs b/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/WebAuthenticationSettingsHostInit.cs index 39a4d92025..642030e65b 100644 --- a/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/WebAuthenticationSettingsHostInit.cs +++ b/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/WebAuthenticationSettingsHostInit.cs @@ -11,7 +11,8 @@ protected override IHostBuilder Custom(IHostBuilder builder) return builder .UseAuthentication(auth => auth - .AddWeb(name: "WebSettings")) // name defines not only the name of the provider but also the section in the appsettings file + .AddWeb(name: "WebSettings") + .AddWeb(name: "WebSettings2")) // name defines not only the name of the provider but also the section in the appsettings file .ConfigureServices(services => services diff --git a/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/appsettings.webauthsettings.json b/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/appsettings.webauthsettings.json index 05df0e25b7..bbba8ef045 100644 --- a/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/appsettings.webauthsettings.json +++ b/testing/TestHarness/TestHarness.Shared/Ext/Authentication/Web/appsettings.webauthsettings.json @@ -2,5 +2,9 @@ "WebSettings": { "LoginStartUri": "https://localhost:7193/webauth/Login/Facebook?redirect_uri=oidc-auth://", "LogoutStartUri": "https://localhost:7193/webauth/Logout/Facebook" + }, + "WebSettings2": { + "LoginStartUri": "https://localhost:7193/webauth/Login/Facebook?redirect_uri=oidc-auth://&setting=2", + "LogoutStartUri": "https://localhost:7193/webauth/Logout/Facebook&setting=2" } } From 02a1a72e032d92b0e36327dc10b3ad170027d570 Mon Sep 17 00:00:00 2001 From: Nick Randolph Date: Wed, 13 Mar 2024 18:59:23 +1100 Subject: [PATCH 3/3] fix: Pass section name so that configuration is correctly resolved by name --- .../ConfigBuilderExtensions.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Uno.Extensions.Configuration/ConfigBuilderExtensions.cs b/src/Uno.Extensions.Configuration/ConfigBuilderExtensions.cs index ea7ef9a11f..492254fa5a 100644 --- a/src/Uno.Extensions.Configuration/ConfigBuilderExtensions.cs +++ b/src/Uno.Extensions.Configuration/ConfigBuilderExtensions.cs @@ -120,14 +120,11 @@ public static IConfigBuilder Section( { if (configSection is null) { - if (configurationSection is { Length: > 0 }) + if (configurationSection is not { Length: > 0 }) { - configSection = ctx => ctx.Configuration.GetSection(configurationSection); - } - else - { - configSection = ctx => ctx.Configuration.GetSection(typeof(TSettingsOptions).Name); + configurationSection = typeof(TSettingsOptions).Name; } + configSection = ctx => ctx.Configuration.GetSection(configurationSection); } static string? FilePath(HostBuilderContext hctx) @@ -160,7 +157,7 @@ public static IConfigBuilder Section( } var section = configSection(ctx); - services.ConfigureAsWritable(section, configPath); + services.ConfigureAsWritable(section, configPath, configurationSection); } ).AsConfigBuilder();