Skip to content

Commit

Permalink
[net9.0] Merge main to net9.0 (#24953)
Browse files Browse the repository at this point in the history
### Description of Change

Bring last changes from main to net9.0
  • Loading branch information
rmarinho authored Sep 30, 2024
2 parents b27176d + 4cd6a9f commit 88b3562
Show file tree
Hide file tree
Showing 71 changed files with 1,158 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "10.0.0-prerelease.24467.4",
"version": "10.0.0-prerelease.24476.1",
"commands": [
"xharness"
]
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ body:
- 9.0.0-preview.3.10457
- 9.0.0-preview.2.10293
- 9.0.0-preview.1.9973
- 8.0.91 SR9.1
- 8.0.90 SR9
- 8.0.82 SR8.2
- 8.0.80 SR8
Expand Down Expand Up @@ -126,6 +127,7 @@ body:
- 8.0.80 SR8
- 8.0.82 SR8.2
- 8.0.90 SR9
- 8.0.91 SR9.1
- 9.0.0-preview.1.9973
- 9.0.0-preview.2.10293
- 9.0.0-preview.3.10457
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/similarIssues.yml

This file was deleted.

1 change: 1 addition & 0 deletions Microsoft.Maui-dev.sln
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedSource", "SharedSource", "{4F2926C8-43AB-4328-A735-D9EAD699F81D}"
ProjectSection(SolutionItems) = preProject
src\BlazorWebView\src\SharedSource\AutoCloseOnReadCompleteStream.cs = src\BlazorWebView\src\SharedSource\AutoCloseOnReadCompleteStream.cs
src\BlazorWebView\src\SharedSource\HostAddressHelper.cs = src\BlazorWebView\src\SharedSource\HostAddressHelper.cs
src\BlazorWebView\src\SharedSource\QueryStringHelper.cs = src\BlazorWebView\src\SharedSource\QueryStringHelper.cs
src\BlazorWebView\src\SharedSource\UrlLoadingEventArgs.cs = src\BlazorWebView\src\SharedSource\UrlLoadingEventArgs.cs
src\BlazorWebView\src\SharedSource\UrlLoadingStrategy.cs = src\BlazorWebView\src\SharedSource\UrlLoadingStrategy.cs
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>46cfb747b4c22471242dee0d106f5c79cf9fd4c5</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="10.0.0-prerelease.24467.4">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="10.0.0-prerelease.24476.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>3cfb1a3d86da666fb80ba0adb970525e88339d57</Sha>
<Sha>7d5c32dbda0c6c8b9dc20cde4e1261b191896138</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24467.4">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24476.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>3cfb1a3d86da666fb80ba0adb970525e88339d57</Sha>
<Sha>7d5c32dbda0c6c8b9dc20cde4e1261b191896138</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="10.0.0-prerelease.24467.4">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="10.0.0-prerelease.24476.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>3cfb1a3d86da666fb80ba0adb970525e88339d57</Sha>
<Sha>7d5c32dbda0c6c8b9dc20cde4e1261b191896138</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@
<_HarfBuzzSharpVersion>7.3.0.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.7af1d0840a381c0ce7ef2877454a88dbb2949686.1086</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.114</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>10.0.0-prerelease.24467.4</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>10.0.0-prerelease.24467.4</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>10.0.0-prerelease.24467.4</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>10.0.0-prerelease.24476.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>10.0.0-prerelease.24476.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>10.0.0-prerelease.24476.1</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.2</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>1.0.0.16</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variables:
- name: isTargetMainBranch
value: $[eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/main')]
- name: isLocPRBranch
value: $[startsWith(variables['System.PullRequest.SourceBranch'], 'loc-hb')]
value: $[startsWith(variables['System.PullRequest.SourceBranch'], 'lego')]
- name: isPullRequest
value: $[eq(variables['Build.Reason'], 'PullRequest')]
- name: isLocHandoffBranch
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-preview.7.24407.12"
"dotnet": "9.0.100-rc.1.24452.12"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
Expand Down
39 changes: 1 addition & 38 deletions src/BlazorWebView/src/Maui/BlazorWebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,7 @@ namespace Microsoft.AspNetCore.Components.WebView.Maui
/// </summary>
public partial class BlazorWebView : View, IBlazorWebView
{
internal static string AppHostAddress { get; } = GetAppHostAddress();

private const string AppHostAddressAlways0000Switch = "BlazorWebView.AppHostAddressAlways0000";

private static bool IsAppHostAddressAlways0000Enabled =>
AppContext.TryGetSwitch(AppHostAddressAlways0000Switch, out var enabled) && enabled;

private static string GetAppHostAddress()
{
if (IsAppHostAddressAlways0000Enabled)
{
return "0.0.0.0";
}
else
{
#if IOS || MACCATALYST
// On iOS/MacCatalyst 18 and higher the 0.0.0.0 address does not work, so we use localhost instead.
// This preserves behavior on older versions of those systems, while defaulting to new behavior on
// the new system.

// Note that pre-release versions of iOS/MacCatalyst have the expected Major/Minor values,
// but the Build, MajorRevision, MinorRevision, and Revision values are all -1, so we need
// to pass in int.MinValue for those values.

if (System.OperatingSystem.IsIOSVersionAtLeast(major: 18, minor: int.MinValue, build: int.MinValue) ||
System.OperatingSystem.IsMacCatalystVersionAtLeast(major: 18, minor: int.MinValue, build: int.MinValue))
{
return "localhost";
}
else
{
return "0.0.0.0";
}
#else
return "0.0.0.0";
#endif
}
}
internal static string AppHostAddress { get; } = HostAddressHelper.GetAppHostAddress();

private readonly JSComponentConfigurationStore _jSComponents = new();

Expand Down
19 changes: 19 additions & 0 deletions src/BlazorWebView/src/SharedSource/HostAddressHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;

namespace Microsoft.AspNetCore.Components.WebView;

internal static class HostAddressHelper
{
private const string AppHostAddressAlways0000Switch = "BlazorWebView.AppHostAddressAlways0000";

private static bool IsAppHostAddressAlways0000Enabled =>
AppContext.TryGetSwitch(AppHostAddressAlways0000Switch, out var enabled) && enabled;

public static string GetAppHostAddress()
=> IsAppHostAddressAlways0000Enabled
? "0.0.0.0"
: "0.0.0.1";
}
4 changes: 2 additions & 2 deletions src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ internal class WebView2WebViewManager : WebViewManager
// Using an IP address means that WebView2 doesn't wait for any DNS resolution,
// making it substantially faster. Note that this isn't real HTTP traffic, since
// we intercept all the requests within this origin.
internal static readonly string AppHostAddress = "0.0.0.0";
internal static readonly string AppHostAddress = HostAddressHelper.GetAppHostAddress();

/// <summary>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.0/</c>
/// Gets the application's base URI. Defaults to <c>https://0.0.0.1/</c>.
/// </summary>
protected static readonly string AppOrigin = $"https://{AppHostAddress}/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<NoWarn>1701;1702;CS8305;8305;CA1416;0612;CS0672;CS0618</NoWarn>
<EnableDefaultPageItems>true</EnableDefaultPageItems>
<EnableDefaultXamlItems>false</EnableDefaultXamlItems>

<PublishReadyToRun>false</PublishReadyToRun>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
Expand Down
3 changes: 2 additions & 1 deletion src/Controls/src/Build.Tasks/BuildException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ class BuildExceptionCode
public static BuildExceptionCode ResourceDictDuplicateKey = new BuildExceptionCode("XC", 0125, nameof(ResourceDictDuplicateKey), "");
public static BuildExceptionCode ResourceDictMissingKey = new BuildExceptionCode("XC", 0126, nameof(ResourceDictMissingKey), "");
public static BuildExceptionCode XKeyNotLiteral = new BuildExceptionCode("XC", 0127, nameof(XKeyNotLiteral), "");

public static BuildExceptionCode StaticResourceSyntax = new BuildExceptionCode("XC", 0128, nameof(StaticResourceSyntax), "");

//CSC equivalents
public static BuildExceptionCode ObsoleteProperty = new BuildExceptionCode("XC", 0618, nameof(ObsoleteProperty), ""); //warning

Expand Down
Loading

0 comments on commit 88b3562

Please sign in to comment.