From 8480f31735d38eab4f5087386e3c4a4e45bf664b Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Mon, 26 Aug 2024 22:42:29 -0700 Subject: [PATCH 01/57] Update the sdk target to net10.0 --- Directory.Build.props | 2 +- eng/restore-toolset.ps1 | 1 + eng/restore-toolset.sh | 1 + global.json | 2 +- ...Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets | 4 ++-- ...Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets | 4 ++-- .../{net9.0 => net10.0}/PublicAPI.Shipped.txt | 0 .../{net9.0 => net10.0}/PublicAPI.Unshipped.txt | 0 .../build/Microsoft.NET.Build.Containers.props | 2 +- .../redist-installer/targets/Crossgen.targets | 2 +- src/Layout/redist/targets/GenerateLayout.targets | 2 +- src/Layout/tool_fsharp/tool_fsc.csproj | 2 +- .../Targets/Sdk.Razor.CurrentVersion.targets | 2 +- src/SourceBuild/content/Directory.Build.props | 2 +- .../Sdk.StaticWebAssets.CurrentVersion.targets | 4 ++-- .../Microsoft.NET.Build.Extensions.targets | 2 +- .../targets/Microsoft.NET.ApiCompat.targets | 2 +- .../targets/Microsoft.NET.Sdk.Common.targets | 2 +- .../Microsoft.NET.SupportedTargetFrameworks.props | 3 ++- .../Targets/Microsoft.NET.Sdk.Publish.targets | 2 +- .../PublishTestUtils.cs | 14 +++++++------- .../StaticWebAssetsCrossTargetingTests.cs | 2 +- test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs | 2 +- .../PackageLibraryDirectDependency.csproj | 2 +- .../PackageLibraryTransitiveDependency.csproj | 2 +- .../PackageLibraryNoStaticAssets.csproj | 2 +- .../PackageLibraryTransitiveDependency.csproj | 2 +- .../MSBuildCultureResourceGeneration.csproj | 2 +- .../SampleApp/SampleApp.csproj | 2 +- .../TestProjects/UseCswinrt/consolecswinrt.csproj | 2 +- test/dotnet-new.Tests/CommonTemplatesTests.cs | 10 ++++++---- 31 files changed, 44 insertions(+), 39 deletions(-) rename src/Containers/Microsoft.NET.Build.Containers/PublicAPI/{net9.0 => net10.0}/PublicAPI.Shipped.txt (100%) rename src/Containers/Microsoft.NET.Build.Containers/PublicAPI/{net9.0 => net10.0}/PublicAPI.Unshipped.txt (100%) diff --git a/Directory.Build.props b/Directory.Build.props index 14a8d9d004bf..8829f7345b2c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,7 +34,7 @@ true false - net9.0 + net10.0 $(SdkTargetFramework) net8.0 diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 83b1fbea151e..6fcd2ebca55b 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -27,6 +27,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" + InstallDotNetSharedFramework "9.0.0-preview.7.24405.7" CreateBuildEnvScripts CreateVSShortcut diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index b3eb3f09e6bc..5a0fb6e39331 100755 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -28,6 +28,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" + InstallDotNetSharedFramework "9.0.0-preview.7.24405.7" CreateBuildEnvScript } diff --git a/global.json b/global.json index 7de56bf8f692..830e34bad522 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.100-preview.7.24407.12", + "dotnet": "9.0.100-rc.2.24420.21", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion)" diff --git a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets index e4a66855ffc7..8a429ecb4f95 100644 --- a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets +++ b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets @@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved. $(MSBuildThisFileDirectory)..\ - <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472 <_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll - <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net9.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll + <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll diff --git a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets index bfa21662ae57..ffd2cb044182 100644 --- a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets +++ b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets @@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved. $(MSBuildThisFileDirectory)..\ - <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472 <_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll - <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net9.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll + <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Shipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Shipped.txt similarity index 100% rename from src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Shipped.txt rename to src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Shipped.txt diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt similarity index 100% rename from src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net9.0/PublicAPI.Unshipped.txt rename to src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props index 4abb098d7c82..22ec95911a7b 100644 --- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props +++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props @@ -3,7 +3,7 @@ true tasks - net9.0 + net10.0 net472 containerize diff --git a/src/Installer/redist-installer/targets/Crossgen.targets b/src/Installer/redist-installer/targets/Crossgen.targets index 85e90c74eb88..0a51b788931c 100644 --- a/src/Installer/redist-installer/targets/Crossgen.targets +++ b/src/Installer/redist-installer/targets/Crossgen.targets @@ -33,7 +33,7 @@ no that we do not silently miss cross-genning some bits. When a TFM for a tool is updated, update its path explicitly. If all TFMs match, update DefaultToolTfm --> - net9.0 + net10.0 $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\ diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets index e7cd9e392c3e..5114b6da7448 100644 --- a/src/Layout/redist/targets/GenerateLayout.targets +++ b/src/Layout/redist/targets/GenerateLayout.targets @@ -177,7 +177,7 @@ BeforeTargets="Build"> netcoreapp3.1 - net9.0 + net10.0 $(NuGetPackageRoot)/microsoft.testplatform.cli/$(MicrosoftTestPlatformCLIPackageVersion)/contentFiles/any/$(TestCliNuGetDirectoryTargetFramework)/ diff --git a/src/Layout/tool_fsharp/tool_fsc.csproj b/src/Layout/tool_fsharp/tool_fsc.csproj index 26cd7a2394fa..fec1d95d8c43 100644 --- a/src/Layout/tool_fsharp/tool_fsc.csproj +++ b/src/Layout/tool_fsharp/tool_fsc.csproj @@ -17,7 +17,7 @@ Shipping Release - net9.0 + net10.0 $(MSBuildThisFileDirectory)..\ $(RazorSdkDirectoryRoot)tasks\ - <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net472 $(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll <_RazorSdkToolAssembly>$(RazorSdkDirectoryRoot)tools\rzc.dll diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index 9b9e79c842f9..d777ad29171e 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -110,7 +110,7 @@ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ - net9.0 + net10.0 diff --git a/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets b/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets index 8f5e436c93eb..082b42b988c0 100644 --- a/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets +++ b/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets @@ -28,10 +28,10 @@ Copyright (c) .NET Foundation. All rights reserved. $(MSBuildThisFileDirectory)..\ $(StaticWebAssetsSdkDirectoryRoot)tasks\ - <_StaticWebAssetsSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_StaticWebAssetsSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_StaticWebAssetsSdkTasksTFM Condition=" '$(_StaticWebAssetsSdkTasksTFM)' == ''">net472 $(StaticWebAssetsSdkBuildTasksDirectoryRoot)$(_StaticWebAssetsSdkTasksTFM)\Microsoft.NET.Sdk.StaticWebAssets.Tasks.dll - <_StaticWebAssetsSdkToolAssembly>$(StaticWebAssetsSdkDirectoryRoot)tools\net9.0\Microsoft.NET.Sdk.StaticWebAssets.Tool.dll + <_StaticWebAssetsSdkToolAssembly>$(StaticWebAssetsSdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.StaticWebAssets.Tool.dll diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets index 2a6469942cd9..eaff81f14135 100644 --- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets +++ b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets @@ -14,7 +14,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV')) - $(MSBuildThisFileDirectory)\tools\net9.0\Microsoft.NET.Build.Extensions.Tasks.dll + $(MSBuildThisFileDirectory)\tools\net10.0\Microsoft.NET.Build.Extensions.Tasks.dll $(MSBuildThisFileDirectory)\tools\net472\Microsoft.NET.Build.Extensions.Tasks.dll diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets index 7f54cfbc5662..c59aae3df11e 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets @@ -12,7 +12,7 @@ Copyright (c) .NET Foundation. All rights reserved. $(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.ApiCompat.Task.dll - $(MSBuildThisFileDirectory)..\tools\net9.0\Microsoft.DotNet.ApiCompat.Task.dll + $(MSBuildThisFileDirectory)..\tools\net10.0\Microsoft.DotNet.ApiCompat.Task.dll net9.0 + net10.0 net472 $(MicrosoftNETBuildTasksDirectoryRoot)$(MicrosoftNETBuildTasksTFM)\ $(MicrosoftNETBuildTasksDirectory)Microsoft.NET.Build.Tasks.dll diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props index 7718e9c56b28..ca64fe5c5fae 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props @@ -28,10 +28,11 @@ Copyright (c) .NET Foundation. All rights reserved. + - 10.0 + 11.0 17.12 diff --git a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets index fcb80c1dfe2f..c5206449c345 100644 --- a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets +++ b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets @@ -19,7 +19,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. true - <_PublishTaskFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0 + <_PublishTaskFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_PublishTaskFramework Condition=" '$(_PublishTaskFramework)' == ''">net472 <_PublishTasksDir Condition=" '$(_PublishTasksDir)'=='' ">$(MSBuildThisFileDirectory)..\tools\$(_PublishTaskFramework)\ <_PublishTaskAssemblyFullPath Condition=" '$(_PublishTaskAssemblyFullPath)'=='' ">$(_PublishTasksDir)Microsoft.NET.Sdk.Publish.Tasks.dll diff --git a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs index 48b8dbe0cb8c..2693b1024a5f 100644 --- a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs +++ b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs @@ -5,7 +5,7 @@ namespace Microsoft.NET.Publish.Tests { internal static class PublishTestUtils { -#if NET9_0 +#if NET10_0 public static IEnumerable SupportedTfms { get; } = new List { @@ -15,7 +15,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net5.0 @@ -26,7 +26,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net6.0 @@ -36,7 +36,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net7.0 @@ -45,7 +45,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net8.0 @@ -53,14 +53,14 @@ internal static class PublishTestUtils { new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net9.0 public static IEnumerable Net9Plus { get; } = new List { new object[] { ToolsetInfo.CurrentTargetFramework }, - // new object[] { ToolsetInfo.NextTargetFramework }, + new object[] { ToolsetInfo.NextTargetFramework }, }; #else #error If building for a newer TFM, please update the values above to include both the old and new TFMs. diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCrossTargetingTests.cs b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCrossTargetingTests.cs index de441891fecf..f8b602caf0ce 100644 --- a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCrossTargetingTests.cs +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCrossTargetingTests.cs @@ -87,7 +87,7 @@ public void Publish_CrosstargetingTests_CanIncludeBrowserAssets() ExecuteCommand(restore).Should().Pass(); var publish = CreatePublishCommand(ProjectDirectory); - ExecuteCommandWithoutRestore(publish, "/bl", "/p:TargetFramework=net9.0").Should().Pass(); + ExecuteCommandWithoutRestore(publish, "/bl", "/p:TargetFramework=net10.0").Should().Pass(); var publishPath = publish.GetOutputDirectory(DefaultTfm).ToString(); var intermediateOutputPath = publish.GetIntermediateDirectory(DefaultTfm, "Debug").ToString(); diff --git a/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs b/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs index 6a69e3acfff2..6c759e50197b 100644 --- a/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs +++ b/test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs @@ -108,7 +108,7 @@ public void TrimmingOptions_Are_Defaulted_Correctly_On_Aot_Apps(string targetFra public static IEnumerable SupportedTfms { get; } = new List { -#if NET9_0 +#if NET10_0 new object[] { ToolsetInfo.CurrentTargetFramework } #else #error If building for a newer TFM, please update the values above diff --git a/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryDirectDependency/PackageLibraryDirectDependency.csproj b/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryDirectDependency/PackageLibraryDirectDependency.csproj index 82c186d067fa..501e8540e2b7 100644 --- a/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryDirectDependency/PackageLibraryDirectDependency.csproj +++ b/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryDirectDependency/PackageLibraryDirectDependency.csproj @@ -1,7 +1,7 @@ true - net9.0 + net10.0 © Microsoft Razor Test Microsoft diff --git a/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj b/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj index 322721e775ce..32623655bd7f 100644 --- a/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj +++ b/test/TestAssets/TestPackages/PackageLibraryDirectDependency/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj @@ -2,7 +2,7 @@ true - net9.0 + net10.0 © Microsoft Razor Test Microsoft diff --git a/test/TestAssets/TestPackages/PackageLibraryNoStaticAssets/PackageLibraryNoStaticAssets.csproj b/test/TestAssets/TestPackages/PackageLibraryNoStaticAssets/PackageLibraryNoStaticAssets.csproj index a5254a35970e..70a40b04bb11 100644 --- a/test/TestAssets/TestPackages/PackageLibraryNoStaticAssets/PackageLibraryNoStaticAssets.csproj +++ b/test/TestAssets/TestPackages/PackageLibraryNoStaticAssets/PackageLibraryNoStaticAssets.csproj @@ -2,7 +2,7 @@ true - net9.0 + net10.0 © Microsoft Razor Test Microsoft diff --git a/test/TestAssets/TestPackages/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj b/test/TestAssets/TestPackages/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj index 322721e775ce..32623655bd7f 100644 --- a/test/TestAssets/TestPackages/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj +++ b/test/TestAssets/TestPackages/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj @@ -2,7 +2,7 @@ true - net9.0 + net10.0 © Microsoft Razor Test Microsoft diff --git a/test/TestAssets/TestProjects/MSBuildCultureResourceGeneration/MSBuildCultureResourceGeneration.csproj b/test/TestAssets/TestProjects/MSBuildCultureResourceGeneration/MSBuildCultureResourceGeneration.csproj index c147bb442ef3..a626742ef584 100644 --- a/test/TestAssets/TestProjects/MSBuildCultureResourceGeneration/MSBuildCultureResourceGeneration.csproj +++ b/test/TestAssets/TestProjects/MSBuildCultureResourceGeneration/MSBuildCultureResourceGeneration.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 enable enable diff --git a/test/TestAssets/TestProjects/SolutionWithAppAndDcProj/SampleApp/SampleApp.csproj b/test/TestAssets/TestProjects/SolutionWithAppAndDcProj/SampleApp/SampleApp.csproj index fd4bd08da298..ed9781c223ab 100644 --- a/test/TestAssets/TestProjects/SolutionWithAppAndDcProj/SampleApp/SampleApp.csproj +++ b/test/TestAssets/TestProjects/SolutionWithAppAndDcProj/SampleApp/SampleApp.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 enable enable diff --git a/test/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj b/test/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj index 6ed44942be30..0ba3f7f5f097 100644 --- a/test/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj +++ b/test/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj @@ -1,7 +1,7 @@ Exe - net9.0 + net10.0 Windows diff --git a/test/dotnet-new.Tests/CommonTemplatesTests.cs b/test/dotnet-new.Tests/CommonTemplatesTests.cs index 6f598250a7ef..27f40ca7e244 100644 --- a/test/dotnet-new.Tests/CommonTemplatesTests.cs +++ b/test/dotnet-new.Tests/CommonTemplatesTests.cs @@ -165,7 +165,9 @@ public void NuGetConfigPermissions() public async Task AotVariants(string name, string language) { // template framework needs to be hardcoded here during the major version transition. - string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}"; + // string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}"; + // Templates have not been updated to net10.0 yet "net9.0"; + string currentDefaultFramework = "net9.0"; string workingDir = CreateTemporaryFolder(folderName: $"{name}-{language}"); string outputDir = "MyProject"; @@ -334,9 +336,9 @@ public async Task FeaturesSupport( bool supportsImplicitUsings, bool supportsFileScopedNs) { - // Templates have not been updated to net9.0 yet "net8.0"; - // string currentDefaultFramework = "net8.0"; - string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}"; + // Templates have not been updated to net10.0 yet "net9.0"; + string currentDefaultFramework = "net9.0"; + // string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}"; string workingDir = CreateTemporaryFolder(folderName: $"{name}-{langVersion ?? "null"}-{framework ?? "null"}"); string outputDir = "MyProject"; From ba19dd8e366e18547ec62ef700bf14bab81956c3 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Mon, 7 Oct 2024 23:13:50 -0700 Subject: [PATCH 02/57] Unlock the build --- Directory.Build.props | 2 +- eng/restore-toolset.ps1 | 2 +- eng/restore-toolset.sh | 2 +- global.json | 2 +- src/Installer/redist-installer/targets/Crossgen.targets | 2 +- src/Layout/tool_fsharp/tool_fsc.csproj | 2 +- .../Microsoft.NET.TestFramework.csproj | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0185c699dc25..bd6ee165a6f9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -39,7 +39,7 @@ net8.0 - $(SdkTargetFramework) + net9.0 diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 0a8914bbc6a6..b37ffd477e0b 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -18,7 +18,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.0-preview.7.24405.7" + InstallDotNetSharedFramework "9.0.0-rc.1.24431.7" CreateBuildEnvScripts CreateVSShortcut diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index c1e5929b9843..803d1b812264 100755 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -24,7 +24,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.0-preview.7.24405.7" + InstallDotNetSharedFramework "9.0.0-rc.1.24431.7" CreateBuildEnvScript } diff --git a/global.json b/global.json index c80fac7f123a..e139867c6956 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.100-rc.1.24452.12", + "dotnet": "10.0.100-alpha.1.24507.21", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)" diff --git a/src/Installer/redist-installer/targets/Crossgen.targets b/src/Installer/redist-installer/targets/Crossgen.targets index 6842d58e574a..11eff6d9fefb 100644 --- a/src/Installer/redist-installer/targets/Crossgen.targets +++ b/src/Installer/redist-installer/targets/Crossgen.targets @@ -40,7 +40,7 @@ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\ $(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\ - $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net9.0\ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\ $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\ diff --git a/src/Layout/tool_fsharp/tool_fsc.csproj b/src/Layout/tool_fsharp/tool_fsc.csproj index fec1d95d8c43..26cd7a2394fa 100644 --- a/src/Layout/tool_fsharp/tool_fsc.csproj +++ b/src/Layout/tool_fsharp/tool_fsc.csproj @@ -17,7 +17,7 @@ Shipping Release - net10.0 + net9.0 false - $(SdkTargetFramework);net472 + $(ResolverTargetFramework);net472 From d69e52c026bcdcc2d7702f9ea6e7fe31a56fdabb Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Thu, 10 Oct 2024 09:03:08 -0700 Subject: [PATCH 03/57] Add an empty Directory.Build.targets --- .../Directory.Build.props | 0 .../TestDirectoryBuildFiles/Directory.Build.targets | 4 ++++ test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) rename test/dotnet-new.Tests/{TestDirectoryBuildProps => TestDirectoryBuildFiles}/Directory.Build.props (100%) create mode 100644 test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.targets diff --git a/test/dotnet-new.Tests/TestDirectoryBuildProps/Directory.Build.props b/test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.props similarity index 100% rename from test/dotnet-new.Tests/TestDirectoryBuildProps/Directory.Build.props rename to test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.props diff --git a/test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.targets b/test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.targets new file mode 100644 index 000000000000..39af617d4232 --- /dev/null +++ b/test/dotnet-new.Tests/TestDirectoryBuildFiles/Directory.Build.targets @@ -0,0 +1,4 @@ + + + + diff --git a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj index ebbe79272df2..4e24da727590 100644 --- a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj @@ -66,8 +66,9 @@ namespace Microsoft.DotNet.Cli.New.IntegrationTests - - + + + From c4d1281ec3b39b51e90a826e2b25894a7f8ae6dd Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 10 Oct 2024 14:39:48 -0700 Subject: [PATCH 04/57] Switch the resolvers and test project to net10.0 --- Directory.Build.props | 2 +- .../Microsoft.NET.TestFramework.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index bd6ee165a6f9..0185c699dc25 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -39,7 +39,7 @@ net8.0 - net9.0 + $(SdkTargetFramework) diff --git a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj index dfba88b572c3..7ef173306cc0 100644 --- a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj +++ b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj @@ -17,7 +17,7 @@ --> false - $(ResolverTargetFramework);net472 + $(SdkTargetFramework);net472 From 7d18b09376e3593af5f470543f1b32feb17e7c6d Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Thu, 10 Oct 2024 15:12:22 -0700 Subject: [PATCH 05/57] Move dotnet-format to use SdkTargetFramework --- .../dotnet-format/dotnet-format.csproj | 2 +- src/Layout/redist/targets/GenerateLayout.targets | 6 +++--- .../tests/Analyzers/AnalyzerAssemblyGenerator.cs | 14 +++++++------- .../tests/dotnet-format.UnitTests.csproj | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/BuiltInTools/dotnet-format/dotnet-format.csproj b/src/BuiltInTools/dotnet-format/dotnet-format.csproj index eec24f025b98..0aade8a30dd5 100644 --- a/src/BuiltInTools/dotnet-format/dotnet-format.csproj +++ b/src/BuiltInTools/dotnet-format/dotnet-format.csproj @@ -1,7 +1,7 @@  - $(NetCurrent) + $(SdkTargetFramework) Exe Microsoft.CodeAnalysis.Tools true diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets index 5114b6da7448..a428bd455c89 100644 --- a/src/Layout/redist/targets/GenerateLayout.targets +++ b/src/Layout/redist/targets/GenerateLayout.targets @@ -113,9 +113,9 @@ - - - + + + diff --git a/test/dotnet-format.Tests/tests/Analyzers/AnalyzerAssemblyGenerator.cs b/test/dotnet-format.Tests/tests/Analyzers/AnalyzerAssemblyGenerator.cs index f7f3d3ce3d2e..9de4386db9d7 100644 --- a/test/dotnet-format.Tests/tests/Analyzers/AnalyzerAssemblyGenerator.cs +++ b/test/dotnet-format.Tests/tests/Analyzers/AnalyzerAssemblyGenerator.cs @@ -32,15 +32,15 @@ private static async Task> GetReferencesAsync() }; // Resolve the targeting pack and the target framework used to compile the test assembly. - var netCurrentTargetingPackVersion = (string)AppContext.GetData("ReferenceAssemblies.NetCurrent.TargetingPackVersion")!; - var netCurrentTargetFramework = (string)AppContext.GetData("ReferenceAssemblies.NetCurrent.TargetFramework")!; + var sdkTargetFrameworkTargetingPackVersion = (string)AppContext.GetData("ReferenceAssemblies.SdkTargetFramework.TargetingPackVersion")!; + var sdkTargetFrameworkTargetFramework = (string)AppContext.GetData("ReferenceAssemblies.SdkTargetFramework.TargetFramework")!; var nugetConfigPath = Path.Combine(TestContext.Current.TestExecutionDirectory, "NuGet.config"); - ReferenceAssemblies netCurrentReferenceAssemblies = new(netCurrentTargetFramework, - new PackageIdentity("Microsoft.NETCore.App.Ref", netCurrentTargetingPackVersion), - Path.Combine("ref", netCurrentTargetFramework)); - netCurrentReferenceAssemblies = netCurrentReferenceAssemblies.WithNuGetConfigFilePath(nugetConfigPath); + ReferenceAssemblies sdkTargetFrameworkReferenceAssemblies = new(sdkTargetFrameworkTargetFramework, + new PackageIdentity("Microsoft.NETCore.App.Ref", sdkTargetFrameworkTargetingPackVersion), + Path.Combine("ref", sdkTargetFrameworkTargetFramework)); + sdkTargetFrameworkReferenceAssemblies = sdkTargetFrameworkReferenceAssemblies.WithNuGetConfigFilePath(nugetConfigPath); - var netcoreMetadataReferences = await netCurrentReferenceAssemblies.ResolveAsync(LanguageNames.CSharp, CancellationToken.None); + var netcoreMetadataReferences = await sdkTargetFrameworkReferenceAssemblies.ResolveAsync(LanguageNames.CSharp, CancellationToken.None); references.AddRange(netcoreMetadataReferences.Where(reference => Path.GetFileName(reference.Display) != "System.Collections.Immutable.dll")); s_references = references; diff --git a/test/dotnet-format.Tests/tests/dotnet-format.UnitTests.csproj b/test/dotnet-format.Tests/tests/dotnet-format.UnitTests.csproj index aaf132f33d25..38f311aa58f2 100644 --- a/test/dotnet-format.Tests/tests/dotnet-format.UnitTests.csproj +++ b/test/dotnet-format.Tests/tests/dotnet-format.UnitTests.csproj @@ -1,7 +1,7 @@  - $(NetCurrent) + $(SdkTargetFramework) Microsoft.CodeAnalysis.Tools.Tests true @@ -20,11 +20,11 @@ - - + + - - + + From 62d748670b8c6a8dac90cecef723b62b585efc69 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 10 Oct 2024 16:27:42 -0700 Subject: [PATCH 06/57] Fix the template tests but we need to check on this as the current output is wrong as it's missing net9. --- .../Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt | 6 +++--- .../WebProjectsTests.CanShowHelp_WebAPI.verified.txt | 6 +++--- .../WebProjectsTests.CanShowHelp_Webapp_common.verified.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt index 48a94bd0a71f..79c6717dd64f 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt @@ -68,13 +68,13 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice - net9.0 Target net9.0 + net10.0 Target net10.0 net8.0 Target net8.0 net7.0 Target net7.0 net6.0 Target net6.0 - Default: net9.0 + Default: net10.0 --no-restore If specified, skips the automatic restore of the project on create. Type: bool Default: false diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt index eae82a093f9d..486159e6c6f5 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt @@ -56,13 +56,13 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice - net9.0 Target net9.0 + net10.0 Target net10.0 net8.0 Target net8.0 net7.0 Target net7.0 net6.0 Target net6.0 - Default: net9.0 + Default: net10.0 --no-restore If specified, skips the automatic restore of the project on create. Type: bool Default: false diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt index 383da485d6d0..61ea5ced062e 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt @@ -72,13 +72,13 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice - net9.0 Target net9.0 + net10.0 Target net10.0 net8.0 Target net8.0 net7.0 Target net7.0 net6.0 Target net6.0 - Default: net9.0 + Default: net10.0 --called-api-url URL of the API to call from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified. Type: string Default: https://graph.microsoft.com/v1.0 From 58ce796f7c2765eecedefa6015616020fb167f55 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 10 Oct 2024 16:27:54 -0700 Subject: [PATCH 07/57] Update source build global.json --- src/SourceBuild/content/global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 1eab464960d3..02bed6e08798 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.100-rc.1.24452.12" + "dotnet": "10.0.100-alpha.1.24507.21" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", From 27881c48277d0f3f2a801aa934f68e9b85ce4adb Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 11 Oct 2024 11:37:45 -0700 Subject: [PATCH 08/57] Update the current target to 10.0 as some tests automatically update to that when the default TFM changes --- .../Utilities/SupportedNetCoreAppVersions.cs | 3 ++- test/Microsoft.NET.TestFramework/ToolsetInfo.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs b/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs index 287be6cdd4b3..a83706124a26 100644 --- a/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs +++ b/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs @@ -32,7 +32,8 @@ public class SupportedNetCoreAppVersions : IEnumerable "6.0", "7.0", "8.0", - "9.0" + "9.0", + "10.0" }; public static IEnumerable TargetFrameworkShortFolderVersion diff --git a/test/Microsoft.NET.TestFramework/ToolsetInfo.cs b/test/Microsoft.NET.TestFramework/ToolsetInfo.cs index 8b02baeee505..c12b13ac4fb5 100644 --- a/test/Microsoft.NET.TestFramework/ToolsetInfo.cs +++ b/test/Microsoft.NET.TestFramework/ToolsetInfo.cs @@ -8,10 +8,10 @@ namespace Microsoft.NET.TestFramework { public class ToolsetInfo { - public const string CurrentTargetFramework = "net9.0"; - public const string CurrentTargetFrameworkVersion = "9.0"; - public const string NextTargetFramework = "net10.0"; - public const string NextTargetFrameworkVersion = "10.0"; + public const string CurrentTargetFramework = "net10.0"; + public const string CurrentTargetFrameworkVersion = "10.0"; + public const string NextTargetFramework = "net11.0"; + public const string NextTargetFrameworkVersion = "11.0"; public const string LatestWinRuntimeIdentifier = "win"; public const string LatestLinuxRuntimeIdentifier = "linux"; From 7c671f93bff84e8aa5afb0ce9fc7c90cd2ce2994 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 11 Oct 2024 11:38:07 -0700 Subject: [PATCH 09/57] Fix the formatting of some of the templating tests --- .../WebProjectsTests.CanShowHelp_Mvc.verified.txt | 8 ++++---- .../WebProjectsTests.CanShowHelp_WebAPI.verified.txt | 8 ++++---- ...ebProjectsTests.CanShowHelp_Webapp_common.verified.txt | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt index 79c6717dd64f..52a210b737db 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Mvc.verified.txt @@ -68,12 +68,12 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 Default: net10.0 --no-restore If specified, skips the automatic restore of the project on create. Type: bool diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt index 486159e6c6f5..b5fa37a85f90 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_WebAPI.verified.txt @@ -56,12 +56,12 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 Default: net10.0 --no-restore If specified, skips the automatic restore of the project on create. Type: bool diff --git a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt index 61ea5ced062e..c272311e7ba8 100644 --- a/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt +++ b/test/dotnet-new.Tests/Approvals/WebProjectsTests.CanShowHelp_Webapp_common.verified.txt @@ -72,12 +72,12 @@ Template options: -uld, --use-local-db Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified. Type: bool Default: false - -f, --framework The target framework for the project. + -f, --framework The target framework for the project. Type: choice net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 Default: net10.0 --called-api-url URL of the API to call from the web app. This option only applies if --auth SingleOrg, --auth MultiOrg or --auth IndividualB2C is specified. Type: string From 83b8fdc08cf9d4da6f3a5c01427ea8a8c985c69b Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 11 Oct 2024 11:38:54 -0700 Subject: [PATCH 10/57] Web templates have moved to target net10.0 already --- test/EndToEnd.Tests/ProjectBuildTests.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/EndToEnd.Tests/ProjectBuildTests.cs b/test/EndToEnd.Tests/ProjectBuildTests.cs index ca82b9a9f2bb..e8e50950601b 100644 --- a/test/EndToEnd.Tests/ProjectBuildTests.cs +++ b/test/EndToEnd.Tests/ProjectBuildTests.cs @@ -411,12 +411,8 @@ private static string DetectExpectedDefaultFramework(string template = "") if (template.StartsWith("mstest") || template.StartsWith("winforms") || template.StartsWith("wpf") - || template.StartsWith("web") - || template.StartsWith("razor") || template.StartsWith("blazor") || template.StartsWith("mvc") - || template.StartsWith("worker") - || template.StartsWith("grpc") || template.StartsWith("classlib") || template.StartsWith("console") || template.StartsWith("nunit") From b715ecead1558f6034d2ad2721b28176449903d8 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Fri, 11 Oct 2024 23:30:48 -0700 Subject: [PATCH 11/57] Update according to the comments --- eng/restore-toolset.ps1 | 2 +- eng/restore-toolset.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index b37ffd477e0b..8074160d0729 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -18,7 +18,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.0-rc.1.24431.7" + InstallDotNetSharedFramework "9.0.100-rc.2.24474.11" CreateBuildEnvScripts CreateVSShortcut diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index 803d1b812264..3feceed8cd1f 100755 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -24,7 +24,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.0-rc.1.24431.7" + InstallDotNetSharedFramework "9.0.100-rc.2.24474.11" CreateBuildEnvScript } From d40538b1114002c36378860f4d0689e9200412d0 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Fri, 11 Oct 2024 23:36:47 -0700 Subject: [PATCH 12/57] Fix version --- eng/restore-toolset.ps1 | 2 +- eng/restore-toolset.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 8074160d0729..283f65ac162f 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -18,7 +18,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.100-rc.2.24474.11" + InstallDotNetSharedFramework "9.0.0-rc.2.24473.5" CreateBuildEnvScripts CreateVSShortcut diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index 3feceed8cd1f..5bf11bc24162 100755 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -24,7 +24,7 @@ function InitializeCustomSDKToolset { InstallDotNetSharedFramework "6.0.0" InstallDotNetSharedFramework "7.0.0" InstallDotNetSharedFramework "8.0.0" - InstallDotNetSharedFramework "9.0.100-rc.2.24474.11" + InstallDotNetSharedFramework "9.0.0-rc.2.24473.5" CreateBuildEnvScript } From a951a656578829ed13952da088f206048d662be3 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Fri, 11 Oct 2024 23:45:08 -0700 Subject: [PATCH 13/57] The current .NET SDK does not support targeting .NET 11.0 --- test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs index 2693b1024a5f..540f62375b54 100644 --- a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs +++ b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs @@ -15,7 +15,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net5.0 @@ -26,7 +26,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net6.0 @@ -36,7 +36,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net7.0 @@ -45,7 +45,7 @@ internal static class PublishTestUtils new object[] { "net7.0" }, new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net8.0 @@ -53,14 +53,14 @@ internal static class PublishTestUtils { new object[] { "net8.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; // This list should contain all supported TFMs after net9.0 public static IEnumerable Net9Plus { get; } = new List { new object[] { ToolsetInfo.CurrentTargetFramework }, - new object[] { ToolsetInfo.NextTargetFramework }, + // new object[] { ToolsetInfo.NextTargetFramework }, }; #else #error If building for a newer TFM, please update the values above to include both the old and new TFMs. From 742a88d37071b9e6fa8be77dc4c6b623a341eee5 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Mon, 14 Oct 2024 01:58:30 -0700 Subject: [PATCH 14/57] Attempting to unlock a bunch of test failures --- test/EndToEnd.Tests/GivenFrameworkDependentApps.cs | 4 ++-- test/EndToEnd.Tests/ProjectBuildTests.cs | 2 -- .../GivenThatWeWantToBuildALibrary.cs | 2 +- .../GivenThatWeWantToFloatWarningLevels.cs | 6 +++--- .../GivenThatWeWantToUseBinaryFormatter.cs | 4 ++-- test/Microsoft.NET.Build.Tests/WorkloadTests.cs | 10 +++++----- .../GivenThatWeWantToPublishANetCoreAppForTelemetry.cs | 4 ++-- ...itargetedSolutionWithPublishReleaseOrPackRelease.cs | 4 ++-- .../Existing/Project1/Project1.csproj | 2 +- .../ExistingWithRename/Project1/Project1.csproj | 2 +- 10 files changed, 19 insertions(+), 21 deletions(-) diff --git a/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs b/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs index b44ba221601e..1eec972b5a8d 100644 --- a/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs +++ b/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs @@ -13,7 +13,7 @@ public class GivenFrameworkDependentApps(ITestOutputHelper log) : SdkTest(log) [ClassData(typeof(SupportedNetCoreAppVersions))] public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion) { - if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0") + if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0") { // https://github.com/dotnet/core-sdk/issues/621 return; @@ -25,7 +25,7 @@ public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion) [ClassData(typeof(SupportedAspNetCoreVersions))] public void ItDoesNotRollForwardToTheLatestVersionOfAspNetCoreApp(string minorVersion) { - if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0") + if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0") { // https://github.com/dotnet/core-sdk/issues/621 return; diff --git a/test/EndToEnd.Tests/ProjectBuildTests.cs b/test/EndToEnd.Tests/ProjectBuildTests.cs index e8e50950601b..bef058aff8f7 100644 --- a/test/EndToEnd.Tests/ProjectBuildTests.cs +++ b/test/EndToEnd.Tests/ProjectBuildTests.cs @@ -411,8 +411,6 @@ private static string DetectExpectedDefaultFramework(string template = "") if (template.StartsWith("mstest") || template.StartsWith("winforms") || template.StartsWith("wpf") - || template.StartsWith("blazor") - || template.StartsWith("mvc") || template.StartsWith("classlib") || template.StartsWith("console") || template.StartsWith("nunit") diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index 07e0143b7f1b..31167bf1de5e 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -709,7 +709,7 @@ private void TestInvalidTargetFramework(string testName, string targetFramework, } [Theory] - [InlineData("netcoreapp9.1")] + [InlineData("netcoreapp10.1")] [InlineData("netstandard2.2")] public void It_fails_to_build_if_targeting_a_higher_framework_than_is_supported(string targetFramework) { diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs index 15cc7ae391d5..fafc1185848a 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs @@ -13,7 +13,7 @@ public GivenThatWeWantToFloatWarningLevels(ITestOutputHelper log) : base(log) } [InlineData(targetFrameworkNet6, "6")] - [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.CurrentTargetFrameworkVersion)] + [InlineData(ToolsetInfo.CurrentTargetFramework, "1")] [InlineData(targetFrameworkNetFramework472, "4")] [RequiresMSBuildVersionTheory("16.8")] public void It_defaults_WarningLevel_To_The_Current_TFM_When_Net(string tfm, string warningLevel) @@ -59,7 +59,7 @@ static void Main() } [InlineData(1, "1")] - [InlineData(null, ToolsetInfo.CurrentTargetFrameworkVersion)] + [InlineData(null, "1")] [RequiresMSBuildVersionTheory("16.8")] public void It_always_accepts_user_defined_WarningLevel(int? warningLevel, string expectedWarningLevel) { @@ -156,7 +156,7 @@ static void Main() buildResult.StdErr.Should().Be(string.Empty); } - [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.NextTargetFrameworkVersion)] + [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.CurrentTargetFrameworkVersion)] [RequiresMSBuildVersionTheory("16.8")] public void It_defaults_preview_AnalysisLevel_to_the_next_tfm(string currentTFM, string nextTFMVersionNumber) { diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs index 282b0c9356b0..98029672102a 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseBinaryFormatter.cs @@ -132,7 +132,7 @@ public void It_warns_when_targeting_certain_frameworks_and_not_using_pragma_supp } [Theory] - [InlineData(ToolsetInfo.CurrentTargetFramework)] + [InlineData("net9.0")] public void It_errors_when_targeting_certain_frameworks_and_not_using_pragma_suppressions(string targetFramework) { var testProject = new TestProject() @@ -158,7 +158,7 @@ public void It_errors_when_targeting_certain_frameworks_and_not_using_pragma_sup } [Theory] - [InlineData(ToolsetInfo.CurrentTargetFramework)] + [InlineData("net9.0")] public void It_allows_downgrading_errors_to_warnings_via_project_config(string targetFramework) { var testProject = new TestProject() diff --git a/test/Microsoft.NET.Build.Tests/WorkloadTests.cs b/test/Microsoft.NET.Build.Tests/WorkloadTests.cs index 7526c08d0353..08d2f0424bb9 100644 --- a/test/Microsoft.NET.Build.Tests/WorkloadTests.cs +++ b/test/Microsoft.NET.Build.Tests/WorkloadTests.cs @@ -235,7 +235,7 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target() var mainProject = new TestProject() { Name = "MainProject", - TargetFrameworks = $"{ToolsetInfo.CurrentTargetFramework}-android", + TargetFrameworks = $"net9.0-android", IsSdkProject = true, IsExe = true }; @@ -260,10 +260,10 @@ public void It_should_get_suggested_workload_by_GetRequiredWorkloads_target() } [Theory] - [InlineData($"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "android;ios")] - [InlineData(ToolsetInfo.CurrentTargetFramework, $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android;{ToolsetInfo.CurrentTargetFramework}-ios", "android;ios")] - [InlineData($"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-ios", $"{ToolsetInfo.CurrentTargetFramework};{ToolsetInfo.CurrentTargetFramework}-android", "android;ios")] - [InlineData(ToolsetInfo.CurrentTargetFramework, ToolsetInfo.CurrentTargetFramework, null)] + [InlineData("net9.0-android;net9.0-ios", "net9.0-android;net9.0-ios", "android;ios")] + [InlineData("net9.0", "net9.0;net9.0-android;net9.0-ios", "android;ios")] + [InlineData("net9.0;net9.0-ios", "net9.0;net9.0-android", "android;ios")] + [InlineData("net9.0", "net9.0", null)] public void Given_multi_target_It_should_get_suggested_workload_by_GetRequiredWorkloads_target(string mainTfm, string referencingTfm, string expected) { // Skip Test if SDK is < 6.0.400 diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs index af114704e410..b72584b8fc37 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs @@ -50,7 +50,7 @@ public void It_collects_Trimmer_SingleFile_ReadyToRun_publishing_properties(stri s.Should().Contain( "{\"EventName\":\"ReadyToRun\",\"Properties\":{\"PublishReadyToRunUseCrossgen2\":\"true\",") .And.MatchRegex( - "\"Crossgen2PackVersion\":\"[5-9]\\..+\""); + "\"Crossgen2PackVersion\":\"1[0-9]\\..+\""); s.Should().Contain( "\"FailedCount\":\"0\""); s.Should().MatchRegex( @@ -82,7 +82,7 @@ void It_collects_crossgen2_publishing_properties(string targetFramework) .And.Contain( "{\"EventName\":\"ReadyToRun\",\"Properties\":{\"PublishReadyToRunUseCrossgen2\":\"true\",") .And.MatchRegex( - "\"Crossgen2PackVersion\":\"[5-9]\\..+\"") + "\"Crossgen2PackVersion\":\"1[0-9]\\..+\"") .And.Contain( "\"CompileListCount\":\"1\",\"FailedCount\":\"0\""); } diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs index 32254e1e39ae..4b77c49bd28d 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs @@ -75,9 +75,9 @@ public void ItUsesReleaseWithATargetFrameworkOptionNet8ForNet6AndNet7Multitarget { var secondProjectTfm = ToolsetInfo.CurrentTargetFramework; // Net8 here is a 'net 8+' project var expectedConfiguration = Release; - var expectedTfm = "net9.0"; + var expectedTfm = "net10.0"; - var (testAsset, testProjects) = Setup(new List { "net6.0", "net7.0", "net8.0", "net9.0" }, new List { secondProjectTfm }, PublishRelease, "", "", identifier: string.Join('-', args)); + var (testAsset, testProjects) = Setup(new List { "net6.0", "net7.0", "net8.0", "net9.0", "net10.0" }, new List { secondProjectTfm }, PublishRelease, "", "", identifier: string.Join('-', args)); var dotnetCommand = new DotnetCommand(Log, publish); dotnetCommand diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/Existing/Project1/Project1.csproj b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/Existing/Project1/Project1.csproj index 36dd7f3c7e78..92e46ddaccf8 100644 --- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/Existing/Project1/Project1.csproj +++ b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/Existing/Project1/Project1.csproj @@ -2,7 +2,7 @@ Exe - $(CurrentTargetFramework) + net9.0 diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/ExistingWithRename/Project1/Project1.csproj b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/ExistingWithRename/Project1/Project1.csproj index 36dd7f3c7e78..92e46ddaccf8 100644 --- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/ExistingWithRename/Project1/Project1.csproj +++ b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/AddProjectReference/ExistingWithRename/Project1/Project1.csproj @@ -2,7 +2,7 @@ Exe - $(CurrentTargetFramework) + net9.0 From bd1d57aa89ba42ab92504b8b8efed8da5a11dff2 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 14 Oct 2024 10:22:44 -0700 Subject: [PATCH 15/57] Temporarily disable a test as we can't reference across TFMs. This can be reenabled once the test tools templates target net10.0 --- test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs b/test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs index 83862b78180d..fb03918297d5 100644 --- a/test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs +++ b/test/Microsoft.NET.Build.Tests/ReferenceExeTests.cs @@ -320,7 +320,7 @@ public void ReferencedExeCanRunWhenPublishedWithTrimming(bool referenceExeInCode .Replace("Boolean", referenceExeInCode.ToString())); } - [RequiresMSBuildVersionTheory("17.0.0.32901")] + [RequiresMSBuildVersionTheory("17.0.0.32901", Skip = "https://github.com/dotnet/sdk/issues/42850")] [InlineData("xunit")] [InlineData("mstest")] public void TestProjectCanReferenceExe(string testTemplateName) From 9ae75b6a72e63f7c6b501b54b881c6d0a0dc86e1 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 14 Oct 2024 12:23:50 -0700 Subject: [PATCH 16/57] Update the regex to handle 5+ --- .../GivenThatWeWantToPublishANetCoreAppForTelemetry.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs index b72584b8fc37..976840b02fc6 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs @@ -50,7 +50,7 @@ public void It_collects_Trimmer_SingleFile_ReadyToRun_publishing_properties(stri s.Should().Contain( "{\"EventName\":\"ReadyToRun\",\"Properties\":{\"PublishReadyToRunUseCrossgen2\":\"true\",") .And.MatchRegex( - "\"Crossgen2PackVersion\":\"1[0-9]\\..+\""); + "\"Crossgen2PackVersion\":\"([5-9]|[1-9]\\d{1,})\\..+\""); s.Should().Contain( "\"FailedCount\":\"0\""); s.Should().MatchRegex( @@ -82,7 +82,7 @@ void It_collects_crossgen2_publishing_properties(string targetFramework) .And.Contain( "{\"EventName\":\"ReadyToRun\",\"Properties\":{\"PublishReadyToRunUseCrossgen2\":\"true\",") .And.MatchRegex( - "\"Crossgen2PackVersion\":\"1[0-9]\\..+\"") + "\"Crossgen2PackVersion\":\"([5-9]|[1-9]\\d{1,})\\..+\"") .And.Contain( "\"CompileListCount\":\"1\",\"FailedCount\":\"0\""); } From b676bbbb2431e0c865988fbe5edc4538c1ebbdd4 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 14 Oct 2024 12:31:41 -0700 Subject: [PATCH 17/57] After talking to baronfel, disabling some container tests for now until the templates are all updated. --- .../CreateNewImageTests.cs | 6 +++--- .../EndToEndTests.cs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs index 66733c52896c..8ed496c70179 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs @@ -20,7 +20,7 @@ public CreateNewImageTests(ITestOutputHelper testOutput) _testOutput = testOutput; } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public void CreateNewImage_Baseline() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); @@ -70,7 +70,7 @@ private static ImageConfig GetImageConfigFromTask(CreateNewImage task) return new(task.GeneratedContainerConfiguration); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public void ParseContainerProperties_EndToEnd() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); @@ -133,7 +133,7 @@ public void ParseContainerProperties_EndToEnd() /// /// Creates a console app that outputs the environment variable added to the image. /// - [DockerAvailableFact()] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public void Tasks_EndToEnd_With_EnvironmentVariable_Validation() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 8507aeff567b..352bb7ced4fb 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -38,7 +38,7 @@ public void Dispose() _loggerFactory.Dispose(); } - [DockerAvailableFact()] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public async Task ApiEndToEndWithRegistryPushAndPull() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithRegistryPushAndPull)); @@ -85,7 +85,7 @@ public async Task ApiEndToEndWithRegistryPushAndPull() } } - [DockerAvailableFact()] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public async Task ApiEndToEndWithLocalLoad() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithLocalLoad)); @@ -126,7 +126,7 @@ public async Task ApiEndToEndWithLocalLoad() } } - [DockerAvailableFact()] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public async Task ApiEndToEndWithArchiveWritingAndLoad() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithArchiveWritingAndLoad)); @@ -468,7 +468,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage privateNuGetAssets.Delete(true); } - [DockerAvailableFact()] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public void EndToEnd_NoAPI_Console() { DirectoryInfo newProjectDir = new(Path.Combine(TestSettings.TestArtifactsDirectory, "CreateNewImageTest")); @@ -555,7 +555,7 @@ public void EndToEnd_NoAPI_Console() [DockerSupportsArchInlineData("linux/386", "linux-x86", "/app", Skip = "There's no apphost for linux-x86 so we can't execute self-contained, and there's no .NET runtime base image for linux-x86 so we can't execute framework-dependent.")] [DockerSupportsArchInlineData("windows/amd64", "win-x64", "C:\\app")] [DockerSupportsArchInlineData("linux/amd64", "linux-x64", "/app")] - [DockerAvailableTheory()] + [DockerAvailableTheory(Skip = "https://github.com/dotnet/sdk/issues/42850")] public async Task CanPackageForAllSupportedContainerRIDs(string dockerPlatform, string rid, string workingDir) { ILogger logger = _loggerFactory.CreateLogger(nameof(CanPackageForAllSupportedContainerRIDs)); From 505ea2649b07f48fb4a6cf211fb0afd6c436af6e Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 16 Oct 2024 13:44:51 -0700 Subject: [PATCH 18/57] Disable a couple more container tests --- .../CreateNewImageTests.cs | 2 +- .../EndToEndTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs index 8ed496c70179..43b766d65c1a 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs @@ -216,7 +216,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation() .And.HaveStdOut("Foo"); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42850")] public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage() { const string RootlessBase = "dotnet/rootlessbase"; diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 352bb7ced4fb..1def4d6b61a7 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -291,7 +291,7 @@ public async Task EndToEnd_MultiProjectSolution() commandResult.Should().HaveStdOutContaining("Pushed image 'consoleapp:latest'"); } - [DockerAvailableTheory()] + [DockerAvailableTheory(Skip = "https://github.com/dotnet/sdk/issues/42850")] [InlineData("webapi", false)] [InlineData("webapi", true)] [InlineData("worker", false)] From 3133bcfd455fb46240fd8bd634b77ccc6c4dc02e Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:01:42 +0300 Subject: [PATCH 19/57] Add ignoredPatterns in NotHaveStdOutContaining --- .../Assertions/CommandResultAssertions.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs b/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs index 6d802d67c33a..add580802130 100644 --- a/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs +++ b/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs @@ -66,10 +66,23 @@ public AndConstraint HaveStdOutContaining(Func(this); } - public AndConstraint NotHaveStdOutContaining(string pattern) + public AndConstraint NotHaveStdOutContaining(string pattern, string[] ignoredPatterns = null) { - Execute.Assertion.ForCondition(!_commandResult.StdOut.Contains(pattern)) + string filteredStdOut = _commandResult.StdOut; + if (ignoredPatterns != null && ignoredPatterns.Length > 0) + { + foreach (var ignoredPattern in ignoredPatterns) + { + filteredStdOut = string.Join(Environment.NewLine, filteredStdOut + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Where(line => !line.Contains(ignoredPattern))); + } + } + + // Perform the assertion on the filtered output + Execute.Assertion.ForCondition(!filteredStdOut.Contains(pattern)) .FailWith(AppendDiagnosticsTo($"The command output contained a result it should not have contained: {pattern}{Environment.NewLine}")); + return new AndConstraint(this); } From 6a079325a6c77f11ad2188ffbade3f9d0b0f3c44 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:04:20 +0300 Subject: [PATCH 20/57] Ignore __compact_unwind warnings --- .../GivenThatWeWantToPublishAnAotApp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index dd583d119f6e..6f50154cff88 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -49,7 +49,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string .And.NotHaveStdOutContaining("IL2026") .And.NotHaveStdErrContaining("NETSDK1179") .And.NotHaveStdErrContaining("warning") - .And.NotHaveStdOutContaining("warning"); + .And.NotHaveStdOutContaining("warning", new[] { "ld: warning: __LD,__compact_unwind entries for" }); var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); var rid = buildProperties["NETCoreSdkPortableRuntimeIdentifier"]; From e6c3248346e6411c33b5f7f5b9a1e1736e2efd80 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:23:00 +0300 Subject: [PATCH 21/57] Ignore clang-16 warning as well --- .../GivenThatWeWantToPublishAnAotApp.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index 6f50154cff88..ea01cfc441ee 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -49,7 +49,11 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string .And.NotHaveStdOutContaining("IL2026") .And.NotHaveStdErrContaining("NETSDK1179") .And.NotHaveStdErrContaining("warning") - .And.NotHaveStdOutContaining("warning", new[] { "ld: warning: __LD,__compact_unwind entries for" }); + .And.NotHaveStdOutContaining("warning", new[] + { + "ld: warning: __LD,__compact_unwind entries for", + "ld: warning: -ld_classic is deprecated and will be removed in a future release" + }); var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); var rid = buildProperties["NETCoreSdkPortableRuntimeIdentifier"]; From 252429dc1be46d054908ef7810ee3ad99c8a52fb Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 24 Oct 2024 15:21:44 -0700 Subject: [PATCH 22/57] Add temp logging --- .../GivenThatWeWantToPublishAnAotApp.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index dd583d119f6e..fe0bfe80f374 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -1048,6 +1048,7 @@ private void CheckIlcVersions(TestAsset testAsset, string targetFramework, strin }; ilcToolsPathCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true").Should().Pass(); var ilcToolsPath = ilcToolsPathCommand.GetValues()[0]; + Console.WriteLine($"IlcToolsPath: {ilcToolsPath}"); var ilcVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(ilcToolsPath))); ilcVersion.Should().Be(expectedVersion); From 7f1ec30e2611f62587e27ac9463ddb5017a86c0b Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 24 Oct 2024 16:00:40 -0700 Subject: [PATCH 23/57] Add .NET 9.0 TFM to PublishTestUtils --- test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs index 540f62375b54..12514a9a6fe2 100644 --- a/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs +++ b/test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs @@ -14,6 +14,7 @@ internal static class PublishTestUtils new object[] { "net6.0" }, new object[] { "net7.0" }, new object[] { "net8.0" }, + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; @@ -25,6 +26,7 @@ internal static class PublishTestUtils new object[] { "net6.0" }, new object[] { "net7.0" }, new object[] { "net8.0" }, + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; @@ -35,6 +37,7 @@ internal static class PublishTestUtils new object[] { "net6.0" }, new object[] { "net7.0" }, new object[] { "net8.0" }, + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; @@ -44,6 +47,7 @@ internal static class PublishTestUtils { new object[] { "net7.0" }, new object[] { "net8.0" }, + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; @@ -52,6 +56,7 @@ internal static class PublishTestUtils public static IEnumerable Net8Plus { get; } = new List { new object[] { "net8.0" }, + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; @@ -59,6 +64,7 @@ internal static class PublishTestUtils // This list should contain all supported TFMs after net9.0 public static IEnumerable Net9Plus { get; } = new List { + new object[] { "net9.0" }, new object[] { ToolsetInfo.CurrentTargetFramework }, // new object[] { ToolsetInfo.NextTargetFramework }, }; From 284e14ce720ce874525ab7c739766fff42a248d8 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 27 Oct 2024 11:42:05 -0700 Subject: [PATCH 24/57] Revert "Add temp logging" This reverts commit 252429dc1be46d054908ef7810ee3ad99c8a52fb. --- .../GivenThatWeWantToPublishAnAotApp.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index fe0bfe80f374..dd583d119f6e 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -1048,7 +1048,6 @@ private void CheckIlcVersions(TestAsset testAsset, string targetFramework, strin }; ilcToolsPathCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:SelfContained=true").Should().Pass(); var ilcToolsPath = ilcToolsPathCommand.GetValues()[0]; - Console.WriteLine($"IlcToolsPath: {ilcToolsPath}"); var ilcVersion = Path.GetFileName(Path.GetDirectoryName(Path.GetDirectoryName(ilcToolsPath))); ilcVersion.Should().Be(expectedVersion); From 1bd7bd2bfe549d624ab5383f02221a41277c4d5b Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 27 Oct 2024 20:58:09 -0700 Subject: [PATCH 25/57] Avoid test directory name collisions Tests with targetFramework theories have to use unique directory for each targetFramework. The Arcade retry logic happened to compensate for up to 2 colliding directories, but that does not work anymore now that we have one more targetFramework. --- .../GivenThatWeWantToPublishAnAotApp.cs | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index dd583d119f6e..f3d2eec17c48 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -40,7 +40,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string { testProject.AdditionalProperties["StripSymbols"] = "true"; } - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand @@ -84,7 +84,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_false(string t var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "false"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -128,7 +128,7 @@ public void NativeAot_app_runs_in_debug_with_no_config_when_PublishAot_is_enable testProject.AdditionalProperties["StripSymbols"] = "true"; } - var testAsset = _testAssetsManager.CreateTestProject(testProject) + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework) // populate a runtime config file with a key value pair // .WithProjectChanges(project => AddRuntimeConfigOption(project)); @@ -179,7 +179,7 @@ public void NativeAot_app_runs_in_release_with_no_config_when_PublishAot_is_enab testProject.AdditionalProperties["StripSymbols"] = "true"; } - var testAsset = _testAssetsManager.CreateTestProject(testProject) + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework) // populate a runtime config file with a key value pair // .WithProjectChanges(project => AddRuntimeConfigOption(project)); @@ -224,7 +224,7 @@ public void NativeAot_app_builds_with_config_when_PublishAot_is_enabled(string t var testProject = CreateAppForConfigCheck(targetFramework, projectName, true); testProject.RecordProperties("NETCoreSdkPortableRuntimeIdentifier"); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject) + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework) // populate a runtime config file with a key value pair // .WithProjectChanges(project => AddRuntimeConfigOption(project)); @@ -272,7 +272,7 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_enabled(string { testProject.AdditionalProperties["StripSymbols"] = "true"; } - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -321,7 +321,7 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_empty(string t { testProject.AdditionalProperties["StripSymbols"] = "true"; } - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -352,7 +352,7 @@ public void NativeAot_hw_runs_with_cross_target_PublishAot_is_enabled(string tar var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -386,7 +386,7 @@ public void NativeAot_hw_runs_with_cross_PackageReference_PublishAot_is_enabled( testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", ExplicitPackageVersion)); testProject.PackageReferences.Add(new TestPackageReference("runtime.win-x64.Microsoft.DotNet.ILCompiler", ExplicitPackageVersion)); - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -421,7 +421,7 @@ public void NativeAot_hw_runs_with_cross_PackageReference_PublishAot_is_empty(st testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", ExplicitPackageVersion)); testProject.PackageReferences.Add(new TestPackageReference("runtime.win-x64.Microsoft.DotNet.ILCompiler", ExplicitPackageVersion)); - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -469,7 +469,7 @@ public void NativeAot_hw_fails_with_sdk6_PackageReference_PublishAot_is_enabled( testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", ExplicitPackageVersion)); - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand @@ -492,7 +492,7 @@ public void NativeAot_hw_fails_with_unsupported_target_rid(string targetFramewor var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject) + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework) .WithProjectChanges(project => OverrideKnownILCompilerPackRuntimeIdentifiers(project, $"{rid};")); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); @@ -515,7 +515,7 @@ public void NativeAot_hw_fails_with_unsupported_host_rid(string targetFramework) var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject) + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework) .WithProjectChanges(project => OverrideKnownILCompilerPackRuntimeIdentifiers(project, $"{supportedTargetRid};")); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); @@ -545,7 +545,7 @@ public void Only_Aot_warnings_are_produced_if_EnableAotAnalyzer_is_set(string ta // unless PublishAot is also set. testProject.AdditionalProperties["EnableAotAnalyzer"] = "true"; testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand @@ -564,7 +564,7 @@ public void IsAotCompatible_implies_enable_analyzers(string targetFramework) var projectName = "WarningAppWithAotAnalyzer"; var testProject = CreateTestProjectWithAnalysisWarnings(targetFramework, projectName, true); testProject.AdditionalProperties["IsAotCompatible"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); buildCommand @@ -677,7 +677,7 @@ public void Requires_analyzers_produce_warnings_without_PublishAot_being_set(str testProject.AdditionalProperties["EnableSingleFileAnalyzer"] = "true"; testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false"; testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand @@ -708,7 +708,7 @@ public void NativeAot_compiler_runs_when_PublishAot_is_enabled(string targetFram testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false"; testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true"; testProject.AdditionalProperties["SelfContained"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -749,7 +749,7 @@ public void Warnings_are_generated_in_build_with_analyzers_enabled(string target testProject.AdditionalProperties["EnableAotAnalyzer"] = "true"; testProject.AdditionalProperties["EnableTrimAnalyzer"] = "true"; testProject.AdditionalProperties["EnableSingleFileAnalyzer"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var buildCommand = new BuildCommand(testAsset); buildCommand @@ -775,7 +775,7 @@ public void Warnings_are_not_generated_in_build_with_analyzers_disabled(string t testProject.AdditionalProperties["EnableAotAnalyzer"] = "false"; testProject.AdditionalProperties["EnableTrimAnalyzer"] = "false"; testProject.AdditionalProperties["EnableSingleFileAnalyzer"] = "false"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var buildCommand = new BuildCommand(testAsset); buildCommand @@ -805,7 +805,7 @@ public void Warnings_are_generated_even_with_analyzers_disabled(string targetFra testProject.AdditionalProperties["SuppressTrimAnalysisWarnings"] = "false"; testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true"; testProject.AdditionalProperties["SelfContained"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -842,7 +842,7 @@ public void NativeAotStaticLib_only_runs_when_switch_is_enabled(string targetFra testProject.AdditionalProperties["SelfContained"] = "true"; testProject.AdditionalProperties["NativeLib"] = "Static"; testProject.SelfContained = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -895,7 +895,7 @@ public void NativeAotSharedLib_only_runs_when_switch_is_enabled(string targetFra testProject.AdditionalProperties["UseCurrentRuntimeIdentifier"] = "true"; testProject.AdditionalProperties["NativeLib"] = "Shared"; testProject.AdditionalProperties["SelfContained"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new PublishCommand(testAsset); publishCommand @@ -920,7 +920,7 @@ public void It_publishes_with_implicit_rid_with_NativeAotApp(string targetFramew var projectName = "ImplicitRidNativeAotApp"; var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand @@ -936,7 +936,7 @@ public void It_builds_with_dynamiccodesupport_false_when_publishaot_true(string var projectName = "DynamicCodeSupportFalseApp"; var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); testProject.AdditionalProperties["PublishAot"] = "true"; - var testAsset = _testAssetsManager.CreateTestProject(testProject); + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); var buildCommand = new BuildCommand(testAsset); buildCommand From 50b52b10f1fe0872da1504bc93c95d4180070f87 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 28 Oct 2024 11:12:12 -0700 Subject: [PATCH 26/57] Add comments --- .../GivenThatWeWantToPublishAnAotApp.cs | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index 30422b8cd8f2..891b538f2478 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -42,6 +42,24 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string } var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFramework); + string[] ignoredPatterns = null; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + ignoredPatterns = new string[] + { + // Both these exclusions can be removed once the min tested version is .NET 10 and the min supported + // XCode version is XCode 16. + + // -ld_classic option is required to workaround bugs in XCode 15 and .NET 9 and older runtimes. + // See https://github.com/dotnet/runtime/issues/97745 for details. + "ld: warning: -ld_classic is deprecated and will be removed in a future release", + // These warnings show up when dotnet/runtime compiled using Apple clang 15+ is used + // with classic linker (either Apple clang 14 or clang 15+ with -ld_classic). + "ld: warning: __LD,__compact_unwind entries for", + }; + } + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); publishCommand .Execute($"/p:UseCurrentRuntimeIdentifier=true", "/p:SelfContained=true", "/p:CheckEolTargetFramework=false") @@ -49,11 +67,7 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string .And.NotHaveStdOutContaining("IL2026") .And.NotHaveStdErrContaining("NETSDK1179") .And.NotHaveStdErrContaining("warning") - .And.NotHaveStdOutContaining("warning", new[] - { - "ld: warning: __LD,__compact_unwind entries for", - "ld: warning: -ld_classic is deprecated and will be removed in a future release" - }); + .And.NotHaveStdOutContaining("warning", ignoredPatterns); var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); var rid = buildProperties["NETCoreSdkPortableRuntimeIdentifier"]; From 2833c53fa5da833d32365d45900751ce027a0426 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 28 Oct 2024 21:24:38 +0100 Subject: [PATCH 27/57] Set NetCurrent accordingly and downgrade VMR SDK --- Directory.Build.props | 2 ++ src/BuiltInTools/dotnet-format/dotnet-format.csproj | 2 +- src/Layout/redist/targets/GenerateLayout.targets | 6 +++--- src/SourceBuild/content/Directory.Build.props | 2 +- src/SourceBuild/content/global.json | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 238410410f9e..9552cf270487 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -35,6 +35,8 @@ true false net10.0 + + net10.0 $(SdkTargetFramework) net8.0 diff --git a/src/BuiltInTools/dotnet-format/dotnet-format.csproj b/src/BuiltInTools/dotnet-format/dotnet-format.csproj index 0aade8a30dd5..eec24f025b98 100644 --- a/src/BuiltInTools/dotnet-format/dotnet-format.csproj +++ b/src/BuiltInTools/dotnet-format/dotnet-format.csproj @@ -1,7 +1,7 @@  - $(SdkTargetFramework) + $(NetCurrent) Exe Microsoft.CodeAnalysis.Tools true diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets index a428bd455c89..5114b6da7448 100644 --- a/src/Layout/redist/targets/GenerateLayout.targets +++ b/src/Layout/redist/targets/GenerateLayout.targets @@ -113,9 +113,9 @@ - - - + + + diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index bd5b2045f5e9..4de35bc0d0a9 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -110,7 +110,7 @@ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ - net10.0 + net9.0 diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 30e83840a33f..3199cb41a94a 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24507.21" + "dotnet": "9.0.100-rc.1.24452.12" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", From d99e5d06e2a167e155bdabd43657d36b71d8c816 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 10:33:04 +0100 Subject: [PATCH 28/57] Set NetCoreAppToolCurrent to SDK value --- src/SourceBuild/content/Directory.Build.props | 2 +- src/SourceBuild/content/global.json | 2 +- .../content/repo-projects/runtime.proj | 3 +++ ...Forward-NetCoreAppToolCurrent-switch.patch | 24 +++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index 4de35bc0d0a9..bd5b2045f5e9 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -110,7 +110,7 @@ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ - net9.0 + net10.0 diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 3199cb41a94a..30e83840a33f 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "9.0.100-rc.1.24452.12" + "dotnet": "10.0.100-alpha.1.24507.21" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", diff --git a/src/SourceBuild/content/repo-projects/runtime.proj b/src/SourceBuild/content/repo-projects/runtime.proj index d91903a39d0a..d4fe18ad5065 100644 --- a/src/SourceBuild/content/repo-projects/runtime.proj +++ b/src/SourceBuild/content/repo-projects/runtime.proj @@ -25,6 +25,9 @@ $(BuildArgs) /p:DotNetBuildMonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) $(BuildArgs) $(FlagParameterPrefix)pgoinstrument $(BuildArgs) /p:UseSystemLibs=$(UseSystemLibs) + + + $(BuildArgs) /p:NetCoreAppToolCurrent=$(NetCurrent) diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch new file mode 100644 index 000000000000..c434d500a95c --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch @@ -0,0 +1,24 @@ +From ec32d6da13a9efe90de357e07edba0c2fdba24f7 Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 29 Oct 2024 10:29:40 +0100 +Subject: [PATCH] Forward NetCoreAppToolCurrent switch + +Backport: https://github.com/dotnet/runtime/pull/109331 + +--- + eng/DotNetBuild.props | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 0a75f2938bf..b79e249f334 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -97,6 +97,8 @@ + $(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_RAPIDJSON=true + $(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_ZLIB=true + ++ ++ $(InnerBuildArgs) /p:NetCoreAppToolCurrent=$(NetCoreAppToolCurrent) + + + From 24c81d307294449eaf59316a5310409d252f6196 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 10:38:06 +0100 Subject: [PATCH 29/57] Forward NetCoreAppToolCurrentVersion --- src/SourceBuild/content/repo-projects/runtime.proj | 2 +- .../runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SourceBuild/content/repo-projects/runtime.proj b/src/SourceBuild/content/repo-projects/runtime.proj index d4fe18ad5065..f88df5407a35 100644 --- a/src/SourceBuild/content/repo-projects/runtime.proj +++ b/src/SourceBuild/content/repo-projects/runtime.proj @@ -27,7 +27,7 @@ $(BuildArgs) /p:UseSystemLibs=$(UseSystemLibs) - $(BuildArgs) /p:NetCoreAppToolCurrent=$(NetCurrent) + $(BuildArgs) /p:NetCoreAppToolCurrentVersion=10.0 diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch index c434d500a95c..040384ae5482 100644 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch @@ -18,7 +18,7 @@ index 0a75f2938bf..b79e249f334 100644 $(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_ZLIB=true + -+ $(InnerBuildArgs) /p:NetCoreAppToolCurrent=$(NetCoreAppToolCurrent) ++ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) From 52986483b253a9137ed1d05234ea3791ad9f12af Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 10:55:27 +0100 Subject: [PATCH 30/57] Update 0001-Forward-NetCoreAppToolCurrent-switch.patch --- .../runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch index 040384ae5482..d9179831bd7b 100644 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch @@ -21,4 +21,3 @@ index 0a75f2938bf..b79e249f334 100644 + $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) - From 89790cadae98412d477b577b3188737b26e2d638 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 11:08:48 +0100 Subject: [PATCH 31/57] Fix patch --- ...Forward-NetCoreAppToolCurrent-switch.patch | 23 ------------------ ...-NetCoreAppToolCurrentVersion-switch.patch | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch create mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch deleted file mode 100644 index d9179831bd7b..000000000000 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrent-switch.patch +++ /dev/null @@ -1,23 +0,0 @@ -From ec32d6da13a9efe90de357e07edba0c2fdba24f7 Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Tue, 29 Oct 2024 10:29:40 +0100 -Subject: [PATCH] Forward NetCoreAppToolCurrent switch - -Backport: https://github.com/dotnet/runtime/pull/109331 - ---- - eng/DotNetBuild.props | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props -index 0a75f2938bf..b79e249f334 100644 ---- a/eng/DotNetBuild.props -+++ b/eng/DotNetBuild.props -@@ -97,6 +97,8 @@ - $(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_RAPIDJSON=true - $(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_ZLIB=true - -+ -+ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) - - diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch new file mode 100644 index 000000000000..a16a35a2ef44 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch @@ -0,0 +1,24 @@ +From 490f896f355b3a7c90b449978d4d60fa0d301f8e Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 29 Oct 2024 10:07:21 +0000 +Subject: [PATCH] Forward NetCoreAppToolCurrentVersion switch + +Backport: https://github.com/dotnet/runtime/pull/109331 + +--- + eng/DotNetBuild.props | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 0a75f2938..4b46ce846 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -70,6 +70,8 @@ + $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) + $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) + $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument ++ ++ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) + + + $(InnerBuildArgs) /p:DotNetBuildRepo=true From 309f3818dfa32eb45ce96b0c67944c239580eb1b Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 12:15:35 +0100 Subject: [PATCH 32/57] Add patch for hardcoded LinkTask TFM --- ...e-LinkTask-TFM-value-for-.NETCoreApp.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch diff --git a/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch b/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch new file mode 100644 index 000000000000..fe27712e7cc0 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch @@ -0,0 +1,26 @@ +From 8bd6139b479872b994f7e08d65d56a536424ae64 Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 29 Oct 2024 12:13:57 +0100 +Subject: [PATCH] Update LinkTask TFM value for .NETCoreApp + +Tracking issue: https://github.com/dotnet/runtime/issues/109335 + +--- + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +index ce24b35de9e..719a740169e 100644 +--- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs ++++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +@@ -269,7 +269,9 @@ public string ILLinkPath { + var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file + // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. +- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); ++ ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); + return _illinkPath; + } + set => _illinkPath = value; From 73fa346392946d63230eba1433446c5829d80252 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 12:54:53 +0100 Subject: [PATCH 33/57] update patches because of sync failure --- ...ppToolCurrentVersion-property-and-fi.patch | 42 +++++++++++++++++++ ...-NetCoreAppToolCurrentVersion-switch.patch | 24 ----------- ...e-LinkTask-TFM-value-for-.NETCoreApp.patch | 26 ------------ 3 files changed, 42 insertions(+), 50 deletions(-) create mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch delete mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch delete mode 100644 src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch new file mode 100644 index 000000000000..9db54da77bee --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch @@ -0,0 +1,42 @@ +From 5b57d576aa9925aa3d6522b01ae5702b0b55fb6f Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 29 Oct 2024 12:52:44 +0100 +Subject: [PATCH] Forward NetCoreAppToolCurrentVersion property and fix linker + +Backport: https://github.com/dotnet/runtime/pull/109331 +Tracking issues: https://github.com/dotnet/runtime/issues/109329 & + https://github.com/dotnet/runtime/issues/109335 + +--- + eng/DotNetBuild.props | 2 ++ + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 0a75f2938bf..4b46ce846af 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -70,6 +70,8 @@ + $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) + $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) + $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument ++ ++ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) + + + $(InnerBuildArgs) /p:DotNetBuildRepo=true +diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +index ce24b35de9e..719a740169e 100644 +--- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs ++++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +@@ -269,7 +269,9 @@ public string ILLinkPath { + var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file + // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. +- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); ++ ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); + return _illinkPath; + } + set => _illinkPath = value; diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch deleted file mode 100644 index a16a35a2ef44..000000000000 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-switch.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 490f896f355b3a7c90b449978d4d60fa0d301f8e Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Tue, 29 Oct 2024 10:07:21 +0000 -Subject: [PATCH] Forward NetCoreAppToolCurrentVersion switch - -Backport: https://github.com/dotnet/runtime/pull/109331 - ---- - eng/DotNetBuild.props | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props -index 0a75f2938..4b46ce846 100644 ---- a/eng/DotNetBuild.props -+++ b/eng/DotNetBuild.props -@@ -70,6 +70,8 @@ - $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) - $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) - $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument -+ -+ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) - - - $(InnerBuildArgs) /p:DotNetBuildRepo=true diff --git a/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch b/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch deleted file mode 100644 index fe27712e7cc0..000000000000 --- a/src/SourceBuild/patches/runtime/0002-Update-LinkTask-TFM-value-for-.NETCoreApp.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8bd6139b479872b994f7e08d65d56a536424ae64 Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Tue, 29 Oct 2024 12:13:57 +0100 -Subject: [PATCH] Update LinkTask TFM value for .NETCoreApp - -Tracking issue: https://github.com/dotnet/runtime/issues/109335 - ---- - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..719a740169e 100644 ---- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -+++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,9 @@ public string ILLinkPath { - var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); - #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file - // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. -- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); -+ -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); - return _illinkPath; - } - set => _illinkPath = value; From 8f1f484c0b48b12d88da65f3263bc0ec636f7cf1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 14:04:24 +0100 Subject: [PATCH 34/57] CLRF -> LF in patch --- ...ppToolCurrentVersion-property-and-fi.patch | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch index 9db54da77bee..b6ae81ad6551 100644 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch +++ b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch @@ -1,42 +1,42 @@ -From 5b57d576aa9925aa3d6522b01ae5702b0b55fb6f Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Tue, 29 Oct 2024 12:52:44 +0100 -Subject: [PATCH] Forward NetCoreAppToolCurrentVersion property and fix linker - -Backport: https://github.com/dotnet/runtime/pull/109331 -Tracking issues: https://github.com/dotnet/runtime/issues/109329 & - https://github.com/dotnet/runtime/issues/109335 - ---- - eng/DotNetBuild.props | 2 ++ - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props -index 0a75f2938bf..4b46ce846af 100644 ---- a/eng/DotNetBuild.props -+++ b/eng/DotNetBuild.props -@@ -70,6 +70,8 @@ - $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) - $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) - $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument -+ -+ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) - - - $(InnerBuildArgs) /p:DotNetBuildRepo=true -diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..719a740169e 100644 ---- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -+++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,9 @@ public string ILLinkPath { - var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); - #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file - // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. -- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); -+ -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); - return _illinkPath; - } - set => _illinkPath = value; +From 5b57d576aa9925aa3d6522b01ae5702b0b55fb6f Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 29 Oct 2024 12:52:44 +0100 +Subject: [PATCH] Forward NetCoreAppToolCurrentVersion property and fix linker + +Backport: https://github.com/dotnet/runtime/pull/109331 +Tracking issues: https://github.com/dotnet/runtime/issues/109329 & + https://github.com/dotnet/runtime/issues/109335 + +--- + eng/DotNetBuild.props | 2 ++ + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 0a75f2938bf..4b46ce846af 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -70,6 +70,8 @@ + $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) + $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) + $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument ++ ++ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) + + + $(InnerBuildArgs) /p:DotNetBuildRepo=true +diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +index ce24b35de9e..719a740169e 100644 +--- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs ++++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +@@ -269,7 +269,9 @@ public string ILLinkPath { + var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file + // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. +- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); ++ ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); + return _illinkPath; + } + set => _illinkPath = value; From a41669df3d90deddeb122a2f7327aba145a9980f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 16:31:10 +0100 Subject: [PATCH 35/57] Update hardcoded tareting and runtime pack versions --- .../targets/GenerateBundledVersions.targets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Installer/redist-installer/targets/GenerateBundledVersions.targets b/src/Installer/redist-installer/targets/GenerateBundledVersions.targets index 9584fe79baad..c45afb48dbe3 100644 --- a/src/Installer/redist-installer/targets/GenerateBundledVersions.targets +++ b/src/Installer/redist-installer/targets/GenerateBundledVersions.targets @@ -86,12 +86,12 @@ <_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion) - <_NET90RuntimePackVersion>9.0.0-preview.7.24405.7 - <_NET90TargetingPackVersion>9.0.0-preview.7.24405.7 - <_WindowsDesktop90RuntimePackVersion>9.0.0-preview.7.24405.2 - <_WindowsDesktop90TargetingPackVersion>9.0.0-preview.7.24405.2 - <_AspNet90RuntimePackVersion>9.0.0-preview.7.24406.2 - <_AspNet90TargetingPackVersion>9.0.0-preview.7.24406.2 + <_NET90RuntimePackVersion>9.0.0-rc.2.24473.5 + <_NET90TargetingPackVersion>9.0.0-rc.2.24473.5 + <_WindowsDesktop90RuntimePackVersion>9.0.0-rc.2.24474.4 + <_WindowsDesktop90TargetingPackVersion>9.0.0-rc.2.24474.4 + <_AspNet90RuntimePackVersion>9.0.0-rc.2.24474.3 + <_AspNet90TargetingPackVersion>9.0.0-rc.2.24474.3 <_NET80RuntimePackVersion>8.0.$(VersionFeature80) <_NET80TargetingPackVersion>8.0.$(VersionFeature80) From 7909f2dd95f47cf4ccddb958fc45d04fca9f0620 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 29 Oct 2024 18:06:54 +0100 Subject: [PATCH 36/57] TestCLI package is net9.0 --- src/Layout/redist/targets/GenerateLayout.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets index 5114b6da7448..e7cd9e392c3e 100644 --- a/src/Layout/redist/targets/GenerateLayout.targets +++ b/src/Layout/redist/targets/GenerateLayout.targets @@ -177,7 +177,7 @@ BeforeTargets="Build"> netcoreapp3.1 - net10.0 + net9.0 $(NuGetPackageRoot)/microsoft.testplatform.cli/$(MicrosoftTestPlatformCLIPackageVersion)/contentFiles/any/$(TestCliNuGetDirectoryTargetFramework)/ From 809164430c49cbabc59b9a91336bddd03ea3dbd7 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 29 Oct 2024 15:35:03 -0700 Subject: [PATCH 37/57] Apply suggestions from code review Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> --- global.json | 2 +- src/SourceBuild/content/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index d7774e971184..63c7fc0ee1e9 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24507.21", + "dotnet": "10.0.100-alpha.1.24529.16", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)" diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 30e83840a33f..6b6bf8f3a64b 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24507.21" + "dotnet": "10.0.100-alpha.1.24529.16" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", From 7933a2c9aba17d3c0984e40e8329d812ea048a4e Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 10:21:05 +0100 Subject: [PATCH 38/57] Update and rename 0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch to 0001-Update-hardcoded-linker-TFM.patch --- ...ppToolCurrentVersion-property-and-fi.patch | 42 ------------------- .../0001-Update-hardcoded-linker-TFM.patch | 26 ++++++++++++ 2 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch create mode 100644 src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch diff --git a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch b/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch deleted file mode 100644 index b6ae81ad6551..000000000000 --- a/src/SourceBuild/patches/runtime/0001-Forward-NetCoreAppToolCurrentVersion-property-and-fi.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5b57d576aa9925aa3d6522b01ae5702b0b55fb6f Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Tue, 29 Oct 2024 12:52:44 +0100 -Subject: [PATCH] Forward NetCoreAppToolCurrentVersion property and fix linker - -Backport: https://github.com/dotnet/runtime/pull/109331 -Tracking issues: https://github.com/dotnet/runtime/issues/109329 & - https://github.com/dotnet/runtime/issues/109335 - ---- - eng/DotNetBuild.props | 2 ++ - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props -index 0a75f2938bf..4b46ce846af 100644 ---- a/eng/DotNetBuild.props -+++ b/eng/DotNetBuild.props -@@ -70,6 +70,8 @@ - $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) - $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) - $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument -+ -+ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) - - - $(InnerBuildArgs) /p:DotNetBuildRepo=true -diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..719a740169e 100644 ---- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -+++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,9 @@ public string ILLinkPath { - var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); - #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file - // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. -- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); -+ -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); - return _illinkPath; - } - set => _illinkPath = value; diff --git a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch new file mode 100644 index 000000000000..007557adc11a --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch @@ -0,0 +1,26 @@ +From 339b685004d698475df89f93e70aa971396df2aa Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Thu, 31 Oct 2024 10:19:33 +0100 +Subject: [PATCH] Update hardcoded linker TFM + +Backport: https://github.com/dotnet/runtime/pull/109376 + +--- + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +index ce24b35de9e..719a740169e 100644 +--- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs ++++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +@@ -269,7 +269,9 @@ public string ILLinkPath { + var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file + // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. +- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); ++ ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); + return _illinkPath; + } + set => _illinkPath = value; From ff69d51d48dc3a624389de20964348b651290675 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 10:36:01 +0100 Subject: [PATCH 39/57] Update patches --- ...=> 0001-Update-hardcoded-illink-tfm.patch} | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename src/SourceBuild/patches/runtime/{0001-Update-hardcoded-linker-TFM.patch => 0001-Update-hardcoded-illink-tfm.patch} (59%) diff --git a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch similarity index 59% rename from src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch rename to src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch index 007557adc11a..9def2067acf9 100644 --- a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-linker-TFM.patch +++ b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch @@ -1,26 +1,27 @@ -From 339b685004d698475df89f93e70aa971396df2aa Mon Sep 17 00:00:00 2001 +From b8303b6543b71099cb0f8e1428183296508f249e Mon Sep 17 00:00:00 2001 From: Viktor Hofer -Date: Thu, 31 Oct 2024 10:19:33 +0100 -Subject: [PATCH] Update hardcoded linker TFM +Date: Thu, 31 Oct 2024 10:34:02 +0100 +Subject: [PATCH] Update hardcoded illink TFM Backport: https://github.com/dotnet/runtime/pull/109376 --- - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..719a740169e 100644 +index ce24b35de9e..98b01a82636 100644 --- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,9 @@ public string ILLinkPath { +@@ -269,7 +269,10 @@ public string ILLinkPath { var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. - _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); + -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); +++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 +++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); ++ return _illinkPath; } set => _illinkPath = value; From bdd67a2a3dd7bd7318813f266418255b67d70fbb Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 11:18:34 +0100 Subject: [PATCH 40/57] Update patch again... --- ...patch => 0001-Update-hardcoded-illink-tfm-value.patch} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename src/SourceBuild/patches/runtime/{0001-Update-hardcoded-illink-tfm.patch => 0001-Update-hardcoded-illink-tfm-value.patch} (77%) diff --git a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch similarity index 77% rename from src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch rename to src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch index 9def2067acf9..a38f37ddcd98 100644 --- a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm.patch +++ b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch @@ -1,4 +1,4 @@ -From b8303b6543b71099cb0f8e1428183296508f249e Mon Sep 17 00:00:00 2001 +From 69036c430b8bf59f96b5a4c9832f28129655b0c4 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 10:34:02 +0100 Subject: [PATCH] Update hardcoded illink TFM @@ -10,7 +10,7 @@ Backport: https://github.com/dotnet/runtime/pull/109376 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..98b01a82636 100644 +index ce24b35de9e..996c8131a91 100644 --- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs @@ -269,7 +269,10 @@ public string ILLinkPath { @@ -19,8 +19,8 @@ index ce24b35de9e..98b01a82636 100644 // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. - _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); + -++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); + return _illinkPath; } From 6f4353a1a8c4fba74fff470e093795ae41f3e3f9 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 12:05:09 +0100 Subject: [PATCH 41/57] Add another runtime patch --- ...id-a-LINQ-usage-in-tensor-extensions.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch diff --git a/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch b/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch new file mode 100644 index 000000000000..11113660c281 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch @@ -0,0 +1,32 @@ +From 6977a231c0e388c01afbd15a40ad0694c3c1a34b Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Thu, 31 Oct 2024 12:03:26 +0100 +Subject: [PATCH] Avoid a LINQ usage in tensor extensions + +Backport: https://github.com/dotnet/runtime/pull/109405 + +--- + .../Numerics/Tensors/netcore/TensorExtensions.cs | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +index 42f6a4319b2..5bddcb2ffc9 100644 +--- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs ++++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +@@ -2658,8 +2658,14 @@ public static Tensor PermuteDimensions(this Tensor tensor, params ReadO + + if (dimensions.IsEmpty) + { +- lengths = tensor._lengths.Reverse().ToArray(); +- permutation = Enumerable.Range(0, tensor.Rank).Reverse().ToArray(); ++ int[] tempPermutation = new int[tensor.Rank]; ++ for (int i = 0; i < tensor.Rank; i++) ++ { ++ lengths[i] = tensor._lengths[tensor.Rank - 1 - i]; ++ tempPermutation[i] = tensor.Rank - 1 - i; ++ } ++ ++ permutation = tempPermutation; + } + else + { From 4c08007bb16d85bf8e482f9010805f1b7f13474a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 12:18:17 +0100 Subject: [PATCH 42/57] damn... update patches again --- ...ge-in-tensor-extensions-and-update-l.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch diff --git a/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch b/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch new file mode 100644 index 000000000000..2be9faef96a2 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch @@ -0,0 +1,50 @@ +From 74679d7b310d0b7003ac5e550796942be7051300 Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Thu, 31 Oct 2024 12:03:26 +0100 +Subject: [PATCH] Avoid a LINQ usage in tensor extensions and update linker tfm + +Backports: +- https://github.com/dotnet/runtime/pull/109405 +- https://github.com/dotnet/runtime/commit/026f615bdecc40a6627fdbbdd6d578d35a8da1e7 +--- + .../Numerics/Tensors/netcore/TensorExtensions.cs | 10 ++++++++-- + src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 5 ++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +index 42f6a4319b2..5bddcb2ffc9 100644 +--- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs ++++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +@@ -2658,8 +2658,14 @@ public static Tensor PermuteDimensions(this Tensor tensor, params ReadO + + if (dimensions.IsEmpty) + { +- lengths = tensor._lengths.Reverse().ToArray(); +- permutation = Enumerable.Range(0, tensor.Rank).Reverse().ToArray(); ++ int[] tempPermutation = new int[tensor.Rank]; ++ for (int i = 0; i < tensor.Rank; i++) ++ { ++ lengths[i] = tensor._lengths[tensor.Rank - 1 - i]; ++ tempPermutation[i] = tensor.Rank - 1 - i; ++ } ++ ++ permutation = tempPermutation; + } + else + { +diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +index ce24b35de9e..996c8131a91 100644 +--- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs ++++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +@@ -269,7 +269,10 @@ public string ILLinkPath { + var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file + // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. +- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); ++ ++ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 ++ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); ++ + return _illinkPath; + } + set => _illinkPath = value; From 4693dfd7b4fe4fed77725731889bc649b1f83bf5 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 12:18:28 +0100 Subject: [PATCH 43/57] and again... --- ...01-Update-hardcoded-illink-tfm-value.patch | 27 ---------------- ...id-a-LINQ-usage-in-tensor-extensions.patch | 32 ------------------- 2 files changed, 59 deletions(-) delete mode 100644 src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch delete mode 100644 src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch diff --git a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch b/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch deleted file mode 100644 index a38f37ddcd98..000000000000 --- a/src/SourceBuild/patches/runtime/0001-Update-hardcoded-illink-tfm-value.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 69036c430b8bf59f96b5a4c9832f28129655b0c4 Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Thu, 31 Oct 2024 10:34:02 +0100 -Subject: [PATCH] Update hardcoded illink TFM - -Backport: https://github.com/dotnet/runtime/pull/109376 - ---- - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..996c8131a91 100644 ---- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -+++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,10 @@ public string ILLinkPath { - var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); - #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file - // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. -- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); -+ -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); -+ - return _illinkPath; - } - set => _illinkPath = value; diff --git a/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch b/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch deleted file mode 100644 index 11113660c281..000000000000 --- a/src/SourceBuild/patches/runtime/0002-Avoid-a-LINQ-usage-in-tensor-extensions.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6977a231c0e388c01afbd15a40ad0694c3c1a34b Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Thu, 31 Oct 2024 12:03:26 +0100 -Subject: [PATCH] Avoid a LINQ usage in tensor extensions - -Backport: https://github.com/dotnet/runtime/pull/109405 - ---- - .../Numerics/Tensors/netcore/TensorExtensions.cs | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -index 42f6a4319b2..5bddcb2ffc9 100644 ---- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -+++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -@@ -2658,8 +2658,14 @@ public static Tensor PermuteDimensions(this Tensor tensor, params ReadO - - if (dimensions.IsEmpty) - { -- lengths = tensor._lengths.Reverse().ToArray(); -- permutation = Enumerable.Range(0, tensor.Rank).Reverse().ToArray(); -+ int[] tempPermutation = new int[tensor.Rank]; -+ for (int i = 0; i < tensor.Rank; i++) -+ { -+ lengths[i] = tensor._lengths[tensor.Rank - 1 - i]; -+ tempPermutation[i] = tensor.Rank - 1 - i; -+ } -+ -+ permutation = tempPermutation; - } - else - { From 5c810ad7184cbc464219e67f148a08d1a069340d Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 18:23:38 +0100 Subject: [PATCH 44/57] Update SDKs --- global.json | 2 +- src/SourceBuild/content/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index a986a32a8c3c..91e18cfc38a7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24529.16", + "dotnet": "10.0.100-alpha.1.24530.16", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)" diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index 6b6bf8f3a64b..a0318af14fde 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24529.16" + "dotnet": "10.0.100-alpha.1.24530.16" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", From 012bedbe59f3000ba707c7f785511d0cfb7371bc Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 31 Oct 2024 20:38:30 +0100 Subject: [PATCH 45/57] Remove now unnecessary patch --- ...ge-in-tensor-extensions-and-update-l.patch | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch diff --git a/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch b/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch deleted file mode 100644 index 2be9faef96a2..000000000000 --- a/src/SourceBuild/patches/runtime/0001-Avoid-a-LINQ-usage-in-tensor-extensions-and-update-l.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 74679d7b310d0b7003ac5e550796942be7051300 Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Thu, 31 Oct 2024 12:03:26 +0100 -Subject: [PATCH] Avoid a LINQ usage in tensor extensions and update linker tfm - -Backports: -- https://github.com/dotnet/runtime/pull/109405 -- https://github.com/dotnet/runtime/commit/026f615bdecc40a6627fdbbdd6d578d35a8da1e7 ---- - .../Numerics/Tensors/netcore/TensorExtensions.cs | 10 ++++++++-- - src/tools/illink/src/ILLink.Tasks/LinkTask.cs | 5 ++++- - 2 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -index 42f6a4319b2..5bddcb2ffc9 100644 ---- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -+++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs -@@ -2658,8 +2658,14 @@ public static Tensor PermuteDimensions(this Tensor tensor, params ReadO - - if (dimensions.IsEmpty) - { -- lengths = tensor._lengths.Reverse().ToArray(); -- permutation = Enumerable.Range(0, tensor.Rank).Reverse().ToArray(); -+ int[] tempPermutation = new int[tensor.Rank]; -+ for (int i = 0; i < tensor.Rank; i++) -+ { -+ lengths[i] = tensor._lengths[tensor.Rank - 1 - i]; -+ tempPermutation[i] = tensor.Rank - 1 - i; -+ } -+ -+ permutation = tempPermutation; - } - else - { -diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -index ce24b35de9e..996c8131a91 100644 ---- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -+++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs -@@ -269,7 +269,10 @@ public string ILLinkPath { - var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); - #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file - // IL Linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. -- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net9.0", "illink.dll"); -+ -+ // TODO: Avoid the hardcoded TFM value: https://github.com/dotnet/runtime/issues/109335 -+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net10.0", "illink.dll"); -+ - return _illinkPath; - } - set => _illinkPath = value; From 64412198fd587c1b7f970f478d7178d02d235597 Mon Sep 17 00:00:00 2001 From: Ella Hathaway Date: Thu, 31 Oct 2024 20:28:54 +0000 Subject: [PATCH 46/57] Update to new prebuilts tarball version --- src/SourceBuild/content/eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props index 568c827fa96b..8eb6a461ccaa 100644 --- a/src/SourceBuild/content/eng/Versions.props +++ b/src/SourceBuild/content/eng/Versions.props @@ -25,7 +25,7 @@ --> 9.0.100-rc.2.24474.1 9.0.100-rc.2.24474.1 - 0.1.0-10.0.100-1 + 0.1.0-10.0.100-2 2.0.0-beta4.24126.1 From 7bc9f92ec8014cf3e9d2dbc657226d8efd69a136 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 1 Nov 2024 10:49:34 -0700 Subject: [PATCH 47/57] Apply suggestions from code review Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> --- global.json | 2 +- src/SourceBuild/content/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 22a29f7209f2..e3c233bc2df7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24530.16", + "dotnet": "10.0.100-alpha.1.24551.9", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)" diff --git a/src/SourceBuild/content/global.json b/src/SourceBuild/content/global.json index a0318af14fde..4e561f406eb9 100644 --- a/src/SourceBuild/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "10.0.100-alpha.1.24530.16" + "dotnet": "10.0.100-alpha.1.24551.9" }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.0", From 18659d894a4d2520fb01f9cf4bbec741d8b9eed0 Mon Sep 17 00:00:00 2001 From: Ella Hathaway Date: Fri, 1 Nov 2024 20:39:14 +0000 Subject: [PATCH 48/57] Update prebuilts tarball --- src/SourceBuild/content/eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props index 8eb6a461ccaa..4367933142fa 100644 --- a/src/SourceBuild/content/eng/Versions.props +++ b/src/SourceBuild/content/eng/Versions.props @@ -25,7 +25,7 @@ --> 9.0.100-rc.2.24474.1 9.0.100-rc.2.24474.1 - 0.1.0-10.0.100-2 + 0.1.0-10.0.100-3 2.0.0-beta4.24126.1 From 4aa59bd95659d0959095f038f179b14462fc914f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Sun, 3 Nov 2024 20:40:47 +0100 Subject: [PATCH 49/57] Set rollforward policy for VMR test projects --- src/SourceBuild/content/test/Directory.Build.props | 3 +++ .../Microsoft.DotNet.UnifiedBuild.Tests.csproj | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SourceBuild/content/test/Directory.Build.props b/src/SourceBuild/content/test/Directory.Build.props index 12ee09caa8c7..d58fb72b0678 100644 --- a/src/SourceBuild/content/test/Directory.Build.props +++ b/src/SourceBuild/content/test/Directory.Build.props @@ -10,6 +10,9 @@ enable $(ArtifactsTestResultsDir) + + Major diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj b/src/SourceBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj index 03c03aeb540f..78e0ab8f338a 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj +++ b/src/SourceBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj @@ -5,7 +5,7 @@ $(DefaultExcludesInProjectFolder);assets/**/* true console%3bverbosity=diagnostic;trx%3bverbosity=diagnostic%3bLogFileName=$(MSBuildProjectName).trx - $(VSTestCLIRunSettings);RunConfiguration.DotNetHostPath=$(DotnetTool) + $(VSTestCLIRunSettings);RunConfiguration.DotNetHostPath=$(DotNetTool) From 5456196d5a7652015b0d8466b9e98c80efecf4a3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 4 Nov 2024 15:34:14 +0100 Subject: [PATCH 50/57] Disable Publish60Hosted_Works until 8.0.5 is available on .NET Framework --- .../BlazorLegacyIntegrationTest60.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs index bf1ca6f53949..edd7db6e40d6 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs @@ -44,7 +44,7 @@ public void Build60Hosted_Works() new FileInfo(Path.Combine(serverBuildOutputDirectory, $"{testAsset}.Shared.dll")).Should().Exist(); } - [PlatformSpecificFact(TestPlatforms.Windows)] + [RequiresMSBuildVersionFact("17.12", Reason = "Needs System.Text.Json 8.0.5")] [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.OSX, "https://github.com/dotnet/sdk/issues/42145")] public void Publish60Hosted_Works() { From bfa607a3f853430796cb422a50178ab748d3079a Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Mon, 4 Nov 2024 12:25:37 -0600 Subject: [PATCH 51/57] Update prebuilts tarball --- src/SourceBuild/content/eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props index 4367933142fa..3c1ecf771c32 100644 --- a/src/SourceBuild/content/eng/Versions.props +++ b/src/SourceBuild/content/eng/Versions.props @@ -25,7 +25,7 @@ --> 9.0.100-rc.2.24474.1 9.0.100-rc.2.24474.1 - 0.1.0-10.0.100-3 + 0.1.0-10.0.100-4 2.0.0-beta4.24126.1 From 8f28cbcc13ef0330a3a6020a3d54f75b3ee139c5 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 4 Nov 2024 12:51:52 -0800 Subject: [PATCH 52/57] switch to the windows only msbuild fact Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> --- .../BlazorLegacyIntegrationTest60.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs index edd7db6e40d6..d87f86b7806f 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs @@ -44,7 +44,7 @@ public void Build60Hosted_Works() new FileInfo(Path.Combine(serverBuildOutputDirectory, $"{testAsset}.Shared.dll")).Should().Exist(); } - [RequiresMSBuildVersionFact("17.12", Reason = "Needs System.Text.Json 8.0.5")] + [WindowsOnlyRequiresMSBuildVersionFact("17.12", Reason = "Needs System.Text.Json 8.0.5")] [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.OSX, "https://github.com/dotnet/sdk/issues/42145")] public void Publish60Hosted_Works() { From 7a3c6e7b2f0111ac664fefcc5da40861665bcf0a Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Mon, 4 Nov 2024 19:43:00 -0800 Subject: [PATCH 53/57] Add Reason property to and update baselines --- ...tBuildAndPublishModules.Publish.files.json | 2 +- ...ublishModules.Publish.staticwebassets.json | 116 ++++++++--------- ...0Hosted_Works.Publish.staticwebassets.json | 120 +++++++++--------- ...nBlazorBootJsonManifest.Publish.files.json | 2 +- ...tJsonManifest.Publish.staticwebassets.json | 116 ++++++++--------- ...ts_PublishMinimal_Works.Publish.files.json | 2 +- ...Minimal_Works.Publish.staticwebassets.json | 116 ++++++++--------- ...iles_AsAssets.Publish.staticwebassets.json | 116 ++++++++--------- ..._Hosted_Works.Publish.staticwebassets.json | 116 ++++++++--------- ...OnlyRequiresMSBuildVersionFactAttribute.cs | 5 + 10 files changed, 358 insertions(+), 353 deletions(-) diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.files.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.files.json index 0af2db05a6a2..3040de35ed4b 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.files.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.files.json @@ -232,7 +232,6 @@ "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_CJK.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_EFIGS.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat", - "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.native.js.gz", @@ -377,6 +376,7 @@ "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\icudt_no_CJK.dat.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\netstandard.wasm.br", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\netstandard.wasm.gz", + "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Components.Forms.wasm", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Components.Web.wasm", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.staticwebassets.json index 307408eaa015..a58d5e03a1c3 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.staticwebassets.json @@ -184,27 +184,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${RestorePath}\\microsoft.netcore.app.runtime.mono.browser-wasm\\${RuntimeVersion}\\runtimes\\browser-wasm\\native\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "SourceId": "blazorwasm-minimal", - "SourceType": "Computed", - "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" - }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "SourceId": "blazorwasm-minimal", @@ -3355,6 +3334,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\wwwroot\\index.html.br" }, + { + "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "blazorwasm-minimal", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", "SourceId": "blazorwasm-minimal", @@ -5039,43 +5039,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "_framework/blazor.webassembly.js.gz", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", @@ -20092,6 +20055,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "_framework/Microsoft.AspNetCore.Authorization.wasm", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json index 6731e6c2cf98..5cefd007b538 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json @@ -175,27 +175,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\Client\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\blazor.publish.boot.json", - "SourceId": "BlazorWasmHosted60.Client", - "SourceType": "Project", - "ContentRoot": "${ProjectPath}\\Client\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\blazor.publish.boot.json" - }, { "Identity": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "SourceId": "BlazorWasmHosted60.Client", @@ -1447,7 +1426,7 @@ "AssetRole": "Alternative", "AssetMergeBehavior": "", "AssetMergeSource": "", - "RelatedAsset": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\blazor.publish.boot.json", + "RelatedAsset": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "br", "Fingerprint": "__fingerprint__", @@ -1468,7 +1447,7 @@ "AssetRole": "Alternative", "AssetMergeBehavior": "", "AssetMergeSource": "", - "RelatedAsset": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\blazor.publish.boot.json", + "RelatedAsset": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "gzip", "Fingerprint": "__fingerprint__", @@ -2296,6 +2275,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\linked\\System.Text.Json.dll" }, + { + "Identity": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "BlazorWasmHosted60.Client", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\Client\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\BlazorWasmHosted60.Client.styles.css", "SourceId": "BlazorWasmHosted60.Client", @@ -2620,43 +2620,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\blazor.publish.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "_framework/blazor.webassembly.js.gz", "AssetFile": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", @@ -10893,6 +10856,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "BlazorWasmHosted60.Client.styles.css", "AssetFile": "${ProjectPath}\\Client\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\BlazorWasmHosted60.Client.styles.css", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.files.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.files.json index 0af2db05a6a2..3040de35ed4b 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.files.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.files.json @@ -232,7 +232,6 @@ "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_CJK.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_EFIGS.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat", - "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.native.js.gz", @@ -377,6 +376,7 @@ "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\icudt_no_CJK.dat.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\netstandard.wasm.br", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\netstandard.wasm.gz", + "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Components.Forms.wasm", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Components.Web.wasm", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.staticwebassets.json index 80d768e2f769..83e556c7211b 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.staticwebassets.json @@ -184,27 +184,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${RestorePath}\\microsoft.netcore.app.runtime.mono.browser-wasm\\${RuntimeVersion}\\runtimes\\browser-wasm\\native\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "SourceId": "blazorwasm-minimal", - "SourceType": "Computed", - "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" - }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "SourceId": "blazorwasm-minimal", @@ -3355,6 +3334,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\wwwroot\\index.html.br" }, + { + "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "blazorwasm-minimal", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", "SourceId": "blazorwasm-minimal", @@ -5039,43 +5039,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "_framework/blazor.webassembly.js.gz", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", @@ -20092,6 +20055,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "_framework/Microsoft.AspNetCore.Authorization.wasm", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.files.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.files.json index 9d88ae08828e..66104eb50199 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.files.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.files.json @@ -235,7 +235,6 @@ "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_CJK.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_EFIGS.dat", "${ProjectPath}\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat", - "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.js.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\dotnet.native.js.gz", @@ -384,6 +383,7 @@ "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\_framework\\netstandard.wasm.gz", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\blazorwasm-minimal#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.br", "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\publish\\blazorwasm-minimal#[.{fingerprint=__fingerprint__}]?.styles.css.br", + "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", "${ProjectPath}\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm-minimal.styles.css", "${ProjectPath}\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\blazorwasm-minimal.bundle.scp.css", "${ProjectPath}\\obj\\Debug\\${Tfm}\\webcil\\publish\\Microsoft.AspNetCore.Authorization.wasm", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.staticwebassets.json index b82bd803f7c8..d8d7ec2e5c63 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.staticwebassets.json @@ -184,27 +184,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${RestorePath}\\microsoft.netcore.app.runtime.mono.browser-wasm\\${RuntimeVersion}\\runtimes\\browser-wasm\\native\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "SourceId": "blazorwasm-minimal", - "SourceType": "Computed", - "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" - }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", "SourceId": "blazorwasm-minimal", @@ -3439,6 +3418,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\wwwroot\\index.html.br" }, + { + "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "blazorwasm-minimal", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm-minimal.styles.css", "SourceId": "blazorwasm-minimal", @@ -5165,43 +5165,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "_framework/blazor.webassembly.js.gz", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\compressed\\_framework\\blazor.webassembly.js.gz", @@ -21066,6 +21029,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "blazorwasm-minimal.styles.css", "AssetFile": "${ProjectPath}\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm-minimal.styles.css", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssets.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssets.Publish.staticwebassets.json index d745c620e67c..46832f320b8b 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssets.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssets.Publish.staticwebassets.json @@ -235,27 +235,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "SourceId": "blazorwasm", - "SourceType": "Project", - "ContentRoot": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json" - }, { "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\Fake-License.txt.gz", "SourceId": "blazorwasm", @@ -3574,6 +3553,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\publish\\serviceworkers\\my-service-worker.js.gz" }, + { + "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "blazorwasm", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm.styles.css", "SourceId": "blazorwasm", @@ -5484,43 +5484,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "Fake-License.txt.gz", "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\Fake-License.txt.gz", @@ -21553,6 +21516,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "blazorwasm.styles.css", "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm.styles.css", diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_Hosted_Works.Publish.staticwebassets.json b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_Hosted_Works.Publish.staticwebassets.json index d745c620e67c..46832f320b8b 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_Hosted_Works.Publish.staticwebassets.json +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_Hosted_Works.Publish.staticwebassets.json @@ -235,27 +235,6 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\wwwroot\\_framework\\icudt_no_CJK.dat" }, - { - "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "SourceId": "blazorwasm", - "SourceType": "Project", - "ContentRoot": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", - "BasePath": "/", - "RelativePath": "_framework/blazor.boot.json", - "AssetKind": "Publish", - "AssetMode": "All", - "AssetRole": "Primary", - "AssetMergeBehavior": "", - "AssetMergeSource": "", - "RelatedAsset": "", - "AssetTraitName": "WasmResource", - "AssetTraitValue": "manifest", - "Fingerprint": "__fingerprint__", - "Integrity": "__integrity__", - "CopyToOutputDirectory": "Never", - "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json" - }, { "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\Fake-License.txt.gz", "SourceId": "blazorwasm", @@ -3574,6 +3553,27 @@ "CopyToPublishDirectory": "PreserveNewest", "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\publish\\serviceworkers\\my-service-worker.js.gz" }, + { + "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "SourceId": "blazorwasm", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\blazorwasm\\bin\\Debug\\${Tfm}\\publish\\wwwroot\\", + "BasePath": "/", + "RelativePath": "_framework/blazor.boot.json", + "AssetKind": "Publish", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "WasmResource", + "AssetTraitValue": "manifest", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json" + }, { "Identity": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm.styles.css", "SourceId": "blazorwasm", @@ -5484,43 +5484,6 @@ } ] }, - { - "Route": "_framework/blazor.boot.json", - "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", - "Selectors": [], - "ResponseHeaders": [ - { - "Name": "Accept-Ranges", - "Value": "bytes" - }, - { - "Name": "Cache-Control", - "Value": "no-cache" - }, - { - "Name": "Content-Length", - "Value": "__content-length__" - }, - { - "Name": "Content-Type", - "Value": "application/json" - }, - { - "Name": "ETag", - "Value": "__etag__" - }, - { - "Name": "Last-Modified", - "Value": "__last-modified__" - } - ], - "EndpointProperties": [ - { - "Name": "integrity", - "Value": "__integrity__" - } - ] - }, { "Route": "Fake-License.txt.gz", "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\compressed\\Fake-License.txt.gz", @@ -21553,6 +21516,43 @@ } ] }, + { + "Route": "_framework/blazor.boot.json", + "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\publish.blazor.boot.json", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "application/json" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, { "Route": "blazorwasm.styles.css", "AssetFile": "${ProjectPath}\\blazorwasm\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\blazorwasm.styles.css", diff --git a/test/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs b/test/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs index 7d7879bf1f9e..8e3b6430fe51 100644 --- a/test/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs +++ b/test/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs @@ -5,6 +5,11 @@ namespace Microsoft.NET.TestFramework { public class WindowsOnlyRequiresMSBuildVersionFactAttribute : FactAttribute { + /// + /// Gets or sets the reason for potentially skipping the test if conditions are not met. + /// + public string Reason { get; set; } + public WindowsOnlyRequiresMSBuildVersionFactAttribute(string version) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) From 482ad03c1bf89b2745cb1ad96542364e8ba7e72c Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 5 Nov 2024 09:16:02 +0100 Subject: [PATCH 54/57] Add wpf patch --- ...-version-in-sync-with-targeting-and-.patch | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 src/SourceBuild/patches/wpf/0001-Keep-apphostpack-version-in-sync-with-targeting-and-.patch diff --git a/src/SourceBuild/patches/wpf/0001-Keep-apphostpack-version-in-sync-with-targeting-and-.patch b/src/SourceBuild/patches/wpf/0001-Keep-apphostpack-version-in-sync-with-targeting-and-.patch new file mode 100644 index 000000000000..b6a83c05ac56 --- /dev/null +++ b/src/SourceBuild/patches/wpf/0001-Keep-apphostpack-version-in-sync-with-targeting-and-.patch @@ -0,0 +1,151 @@ +From bafb5b89e13ae06c8525fa3f73a84c222527da6a Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Mon, 4 Nov 2024 11:06:03 +0100 +Subject: [PATCH] Keep apphostpack version in sync with targeting and runtime + pack version + +Unblocks https://github.com/dotnet/sdk/pull/43015 + +WPF uses a "live" version of the .NETCoreApp targeting and runtime pack. Also use the live version for the apphost pack so that vcxprojs don't depend on the version inside the SDK. + +Backport: https://github.com/dotnet/wpf/pull/10030 + +--- + eng/Tools.props | 15 +++ + .../tools/RuntimeFrameworkReference.targets | 94 ++++++++++++++++--- + 2 files changed, 95 insertions(+), 14 deletions(-) + create mode 100644 eng/Tools.props + +diff --git a/eng/Tools.props b/eng/Tools.props +new file mode 100644 +index 000000000..1393e1776 +--- /dev/null ++++ b/eng/Tools.props +@@ -0,0 +1,15 @@ ++ ++ ++ ++ <_RuntimeIdentifier Condition="'$(Platform)' == ''">win-x86 ++ <_RuntimeIdentifier Condition="'$(Platform)' != ''">win-$(Platform) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets +index 95cb70775..6dd7eb19e 100644 +--- a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets ++++ b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets +@@ -12,15 +12,6 @@ + Version="$(MicrosoftNETCorePlatformsVersion)" + Condition="'$(ManagedCxx)'=='true'"/> + +- +- $(MicrosoftNETCoreAppRefVersion) +- +- + ++ ++ true ++ true ++ true ++ ++ ++ ++ ++ $(MicrosoftNETCoreAppRefVersion) ++ $(MicrosoftNETCoreAppRuntimewinx64Version) ++ $(MicrosoftNETCoreAppRuntimewinx64Version) ++ ++ ++ ++ ++ ++ ++ ++ + +- $(MicrosoftNETCoreAppRuntimewinx64Version) ++ false ++ false ++ false ++ ++ false + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ResolvedRuntimePackPath>@(ResolvedRuntimePack->WithMetadataValue('FrameworkName', 'Microsoft.NETCore.App')->Metadata('Path')) ++ ++ ++ ++ ++ $(NuGetPackageRoot)microsoft.netcore.app.ref\$(MicrosoftNETCoreAppRefVersion) ++ $(MicrosoftNETCoreAppRefVersion) ++ $(_ResolvedRuntimePackPath) ++ $(MicrosoftNETCoreAppRuntimewinx64Version) ++ ++ ++ ++ ++ ++ ++ ++ ++ @(ResolvedAppHostPack->'%(Path)') ++ ++ ++ ++ @(ResolvedIjwHostPack->'%(Path)') ++ ++ ++ + From c0cdf432f30af1756a8c2068b96e5889805b86b1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 5 Nov 2024 13:15:43 +0100 Subject: [PATCH 55/57] Add Arcade patch --- .../arcade/0001-Update-stj-workaround.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch diff --git a/src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch b/src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch new file mode 100644 index 000000000000..d4fad1833f9e --- /dev/null +++ b/src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch @@ -0,0 +1,24 @@ +From 38b0330b3590032071706c330055a4631e70e558 Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 5 Nov 2024 13:13:50 +0100 +Subject: [PATCH] Update Workarounds.targets because of 10.0 SDK change + +Backport: https://github.com/dotnet/arcade/pull/15218 + +--- + src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets +index 492130d40fc..bae31b8689d 100644 +--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets ++++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets +@@ -197,7 +197,7 @@ + Date: Tue, 5 Nov 2024 13:38:10 +0100 Subject: [PATCH 56/57] Damn, I hate patches --- ...01-Update-workaround-for-STJ-8.0.0.4-version.patch} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename src/SourceBuild/patches/arcade/{0001-Update-stj-workaround.patch => 0001-Update-workaround-for-STJ-8.0.0.4-version.patch} (80%) diff --git a/src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch b/src/SourceBuild/patches/arcade/0001-Update-workaround-for-STJ-8.0.0.4-version.patch similarity index 80% rename from src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch rename to src/SourceBuild/patches/arcade/0001-Update-workaround-for-STJ-8.0.0.4-version.patch index d4fad1833f9e..60e82df3399f 100644 --- a/src/SourceBuild/patches/arcade/0001-Update-stj-workaround.patch +++ b/src/SourceBuild/patches/arcade/0001-Update-workaround-for-STJ-8.0.0.4-version.patch @@ -1,7 +1,7 @@ -From 38b0330b3590032071706c330055a4631e70e558 Mon Sep 17 00:00:00 2001 +From c0c75f6fa385d6959cc2c7c475c01208f9f30830 Mon Sep 17 00:00:00 2001 From: Viktor Hofer -Date: Tue, 5 Nov 2024 13:13:50 +0100 -Subject: [PATCH] Update Workarounds.targets because of 10.0 SDK change +Date: Tue, 5 Nov 2024 13:37:06 +0100 +Subject: [PATCH] Update workaround for STJ 8.0.0.4 version Backport: https://github.com/dotnet/arcade/pull/15218 @@ -10,7 +10,7 @@ Backport: https://github.com/dotnet/arcade/pull/15218 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets -index 492130d40fc..bae31b8689d 100644 +index 492130d40..bae31b868 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets @@ -197,7 +197,7 @@ @@ -21,4 +21,4 @@ index 492130d40fc..bae31b8689d 100644 + System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\Sdks\Microsoft.NET.Sdk.StaticWebAssets\tasks\net472\System.Text.Json.dll"); } catch - { \ No newline at end of file + { From 3820c210188a0c05a6920bcf90a4be11692a5363 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 5 Nov 2024 15:55:41 +0100 Subject: [PATCH 57/57] Add windowsdesktop patch --- ...date-SDK-and-remove-net10-workaround.patch | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 src/SourceBuild/patches/windowsdesktop/0001-Update-SDK-and-remove-net10-workaround.patch diff --git a/src/SourceBuild/patches/windowsdesktop/0001-Update-SDK-and-remove-net10-workaround.patch b/src/SourceBuild/patches/windowsdesktop/0001-Update-SDK-and-remove-net10-workaround.patch new file mode 100644 index 000000000000..21a7f78e5c82 --- /dev/null +++ b/src/SourceBuild/patches/windowsdesktop/0001-Update-SDK-and-remove-net10-workaround.patch @@ -0,0 +1,89 @@ +From d6d8add5aad503877ee4344bce77dfa0b054752a Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Tue, 5 Nov 2024 14:53:29 +0000 +Subject: [PATCH] Update SDK and remove net10 workaround + +Backport: https://github.com/dotnet/windowsdesktop/pull/4763 + +--- + Directory.Build.props | 2 +- + Directory.Build.targets | 18 ------------------ + global.json | 2 +- + .../src/sfx/Directory.Build.targets | 12 ++++++++++++ + 4 files changed, 14 insertions(+), 20 deletions(-) + +diff --git a/Directory.Build.props b/Directory.Build.props +index 09e49d41..daf75b2f 100644 +--- a/Directory.Build.props ++++ b/Directory.Build.props +@@ -26,7 +26,7 @@ + + $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 + +- ++ + net10.0 + + +diff --git a/Directory.Build.targets b/Directory.Build.targets +index d816857c..7b2a3390 100644 +--- a/Directory.Build.targets ++++ b/Directory.Build.targets +@@ -10,22 +10,4 @@ + $(MajorVersion).$(MinorVersion) + + +- +- +- +- +- +- +- +- +- +- +- + +diff --git a/global.json b/global.json +index 0e7f27a5..412fb4a9 100644 +--- a/global.json ++++ b/global.json +@@ -1,6 +1,6 @@ + { + "tools": { +- "dotnet": "9.0.100-rc.2.24474.11", ++ "dotnet": "10.0.100-alpha.1.24551.9", + "runtimes": { + "dotnet": [ + "$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)" +diff --git a/src/windowsdesktop/src/sfx/Directory.Build.targets b/src/windowsdesktop/src/sfx/Directory.Build.targets +index 82de7dd9..ca14567b 100644 +--- a/src/windowsdesktop/src/sfx/Directory.Build.targets ++++ b/src/windowsdesktop/src/sfx/Directory.Build.targets +@@ -2,6 +2,18 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ + + +