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(); 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.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" } } 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'))"/> + + + +