Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the sdk target to net10.0 #43015

Merged
merged 71 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8480f31
Update the sdk target to net10.0
v-wuzhai Aug 27, 2024
10d8ad6
Merge branch 'main' of https://github.com/dotnet/sdk into dev/Jason/U…
v-wuzhai Aug 27, 2024
6003d81
Merge branch 'main' of https://github.com/dotnet/sdk into dev/Jason/U…
v-wuzhai Oct 8, 2024
ba19dd8
Unlock the build
v-wuzhai Oct 8, 2024
d69e52c
Add an empty Directory.Build.targets
mmitche Oct 10, 2024
eb0cd8a
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
mmitche Oct 10, 2024
c4d1281
Switch the resolvers and test project to net10.0
marcpopMSFT Oct 10, 2024
7d18b09
Move dotnet-format to use SdkTargetFramework
mmitche Oct 10, 2024
62d7486
Fix the template tests but we need to check on this as the current ou…
marcpopMSFT Oct 10, 2024
58ce796
Update source build global.json
marcpopMSFT Oct 10, 2024
27881c4
Update the current target to 10.0 as some tests automatically update …
marcpopMSFT Oct 11, 2024
7c671f9
Fix the formatting of some of the templating tests
marcpopMSFT Oct 11, 2024
83b8fdc
Web templates have moved to target net10.0 already
marcpopMSFT Oct 11, 2024
b18d98f
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
marcpopMSFT Oct 11, 2024
b715ece
Update according to the comments
v-wuzhai Oct 12, 2024
d40538b
Fix version
v-wuzhai Oct 12, 2024
a951a65
The current .NET SDK does not support targeting .NET 11.0
v-wuzhai Oct 12, 2024
742a88d
Attempting to unlock a bunch of test failures
v-wuzhai Oct 14, 2024
bd1d57a
Temporarily disable a test as we can't reference across TFMs. This ca…
marcpopMSFT Oct 14, 2024
9ae75b6
Update the regex to handle 5+
marcpopMSFT Oct 14, 2024
b676bbb
After talking to baronfel, disabling some container tests for now unt…
marcpopMSFT Oct 14, 2024
505ea26
Disable a couple more container tests
marcpopMSFT Oct 16, 2024
3133bcf
Add ignoredPatterns in NotHaveStdOutContaining
am11 Oct 21, 2024
6a07932
Ignore __compact_unwind warnings
am11 Oct 21, 2024
e6c3248
Ignore clang-16 warning as well
am11 Oct 21, 2024
252429d
Add temp logging
jkotas Oct 24, 2024
7f1ec30
Add .NET 9.0 TFM to PublishTestUtils
jkotas Oct 24, 2024
284e14c
Revert "Add temp logging"
jkotas Oct 27, 2024
9c9f903
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
jkotas Oct 27, 2024
1bd7bd2
Avoid test directory name collisions
jkotas Oct 28, 2024
95f5fa9
Merge remote-tracking branch 'am11/ignore-ld-warning' into dev/Jason/…
jkotas Oct 28, 2024
50b52b1
Add comments
jkotas Oct 28, 2024
2833c53
Set NetCurrent accordingly and downgrade VMR SDK
ViktorHofer Oct 28, 2024
d99e5d0
Set NetCoreAppToolCurrent to SDK value
ViktorHofer Oct 29, 2024
24c81d3
Forward NetCoreAppToolCurrentVersion
ViktorHofer Oct 29, 2024
5298648
Update 0001-Forward-NetCoreAppToolCurrent-switch.patch
ViktorHofer Oct 29, 2024
89790ca
Fix patch
ViktorHofer Oct 29, 2024
556992a
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Oct 29, 2024
309f381
Add patch for hardcoded LinkTask TFM
ViktorHofer Oct 29, 2024
73fa346
update patches because of sync failure
ViktorHofer Oct 29, 2024
8f1f484
CLRF -> LF in patch
ViktorHofer Oct 29, 2024
a41669d
Update hardcoded tareting and runtime pack versions
ViktorHofer Oct 29, 2024
7909f2d
TestCLI package is net9.0
ViktorHofer Oct 29, 2024
98bd6dd
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Oct 29, 2024
8091644
Apply suggestions from code review
jkotas Oct 29, 2024
f61431e
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Oct 30, 2024
7cdb0cb
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Oct 31, 2024
7933a2c
Update and rename 0001-Forward-NetCoreAppToolCurrentVersion-property-…
ViktorHofer Oct 31, 2024
ff69d51
Update patches
ViktorHofer Oct 31, 2024
bdd67a2
Update patch again...
ViktorHofer Oct 31, 2024
6f4353a
Add another runtime patch
ViktorHofer Oct 31, 2024
4c08007
damn... update patches again
ViktorHofer Oct 31, 2024
4693dfd
and again...
ViktorHofer Oct 31, 2024
5c810ad
Update SDKs
ViktorHofer Oct 31, 2024
e64a7b3
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Oct 31, 2024
012bedb
Remove now unnecessary patch
ViktorHofer Oct 31, 2024
6441219
Update to new prebuilts tarball version
ellahathaway Oct 31, 2024
7bc9f92
Apply suggestions from code review
jkoritzinsky Nov 1, 2024
18659d8
Update prebuilts tarball
ellahathaway Nov 1, 2024
27a0734
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Nov 2, 2024
d6ad34d
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
ViktorHofer Nov 3, 2024
4aa59bd
Set rollforward policy for VMR test projects
ViktorHofer Nov 3, 2024
5456196
Disable Publish60Hosted_Works until 8.0.5 is available on .NET Framework
ViktorHofer Nov 4, 2024
bfa607a
Update prebuilts tarball
mthalman Nov 4, 2024
8f28cbc
switch to the windows only msbuild fact
marcpopMSFT Nov 4, 2024
6d2c4eb
Merge branch 'main' into dev/Jason/Update-the-sdk-target-to-net10.0
nagilson Nov 5, 2024
7a3c6e7
Add Reason property to and update baselines
v-wuzhai Nov 5, 2024
482ad03
Add wpf patch
ViktorHofer Nov 5, 2024
c0cdf43
Add Arcade patch
ViktorHofer Nov 5, 2024
575036c
Damn, I hate patches
ViktorHofer Nov 5, 2024
3820c21
Add windowsdesktop patch
ViktorHofer Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
<!-- Default to all packages generating a corresponding symbol package -->
<IncludeSymbols>true</IncludeSymbols>
<IsShippingPackage>false</IsShippingPackage>
<SdkTargetFramework>net9.0</SdkTargetFramework>
<SdkTargetFramework>net10.0</SdkTargetFramework>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
<!-- TODO: Remove when Arcade updated NetCurrent to net10.0. -->
<NetCurrent>net10.0</NetCurrent>
<ToolsetTargetFramework>$(SdkTargetFramework)</ToolsetTargetFramework>
<VisualStudioServiceTargetFramework>net8.0</VisualStudioServiceTargetFramework>

Expand Down
1 change: 1 addition & 0 deletions eng/restore-toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "6.0.0"
InstallDotNetSharedFramework "7.0.0"
InstallDotNetSharedFramework "8.0.0"
InstallDotNetSharedFramework "9.0.0-rc.2.24473.5"

CreateBuildEnvScripts
CreateVSShortcut
Expand Down
1 change: 1 addition & 0 deletions eng/restore-toolset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "6.0.0"
InstallDotNetSharedFramework "7.0.0"
InstallDotNetSharedFramework "8.0.0"
InstallDotNetSharedFramework "9.0.0-rc.2.24473.5"

CreateBuildEnvScript
}
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-rc.2.24474.11",
"dotnet": "10.0.100-alpha.1.24551.9",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx64100PackageVersion)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<!-- Paths to tools, tasks, and extensions are calculated relative to the BlazorWebAssemblySdkDirectoryRoot. This can be modified to test a local build. -->
<BlazorWebAssemblySdkDirectoryRoot Condition="'$(BlazorWebAssemblySdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\</BlazorWebAssemblySdkDirectoryRoot>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll</_BlazorWebAssemblySdkTasksAssembly>
<_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net9.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll</_BlazorWebAssemblySdkToolAssembly>
<_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll</_BlazorWebAssemblySdkToolAssembly>
</PropertyGroup>

<UsingTask TaskName="Microsoft.NET.Sdk.BlazorWebAssembly.GenerateBlazorWebAssemblyBootJson50" AssemblyFile="$(_BlazorWebAssemblySdkTasksAssembly)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<!-- Paths to tools, tasks, and extensions are calculated relative to the BlazorWebAssemblySdkDirectoryRoot. This can be modified to test a local build. -->
<BlazorWebAssemblySdkDirectoryRoot Condition="'$(BlazorWebAssemblySdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\</BlazorWebAssemblySdkDirectoryRoot>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472</_BlazorWebAssemblySdkTasksTFM>
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll</_BlazorWebAssemblySdkTasksAssembly>
<_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net9.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll</_BlazorWebAssemblySdkToolAssembly>
<_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll</_BlazorWebAssemblySdkToolAssembly>
</PropertyGroup>

<UsingTask TaskName="Microsoft.NET.Sdk.BlazorWebAssembly.CreateBlazorTrimmerRootDescriptorFile" AssemblyFile="$(_BlazorWebAssemblySdkTasksAssembly)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- A flag representing this package existing in a project. -->
<SDKContainerSupportEnabled>true</SDKContainerSupportEnabled>
<ContainerTaskFolderName>tasks</ContainerTaskFolderName>
<ContainerTaskFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net9.0</ContainerTaskFramework>
<ContainerTaskFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net10.0</ContainerTaskFramework>
<ContainerTaskFramework Condition="'$(MSBuildRuntimeType)' == 'Full'">net472</ContainerTaskFramework>
<ContainerizeFolderName>containerize</ContainerizeFolderName>
<!--The folder where the custom task will be present. It points to inside the nuget package. -->
Expand Down
4 changes: 2 additions & 2 deletions src/Installer/redist-installer/targets/Crossgen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
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 -->
<PropertyGroup>
<DefaultToolTfm>net9.0</DefaultToolTfm>
<DefaultToolTfm>net10.0</DefaultToolTfm>

<NetSdkTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\</NetSdkTools>
<BlazorWasmTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\</BlazorWasmTools>
<NuGetPackTools>$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\</NuGetPackTools>
<RazorTasks>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\</RazorTasks>
<WindowsDesktopTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\</WindowsDesktopTools>
<WindowsDesktopTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net9.0\</WindowsDesktopTools>
<PublishTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\</PublishTools>
<WebTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\</WebTools>
<ProjectSystemTools>$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\</ProjectSystemTools>
Expand Down
2 changes: 1 addition & 1 deletion src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
<RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\</RazorSdkDirectoryRoot>
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net9.0</_RazorSdkTasksTFM>
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0</_RazorSdkTasksTFM>
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net472</_RazorSdkTasksTFM>
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
<_RazorSdkToolAssembly>$(RazorSdkDirectoryRoot)tools\rzc.dll</_RazorSdkToolAssembly>
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<IntermediateOutputPath Condition="'$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>

<!-- TargetFrameworkDefaults.props -->
<NetCurrent>net9.0</NetCurrent>
<NetCurrent>net10.0</NetCurrent>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<!-- Manually import the Versions.props file when the Arcade SDK isn't used. -->
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-->
<PrivateSourceBuiltSdkVersion>9.0.100-rc.2.24474.1</PrivateSourceBuiltSdkVersion>
<PrivateSourceBuiltArtifactsVersion>9.0.100-rc.2.24474.1</PrivateSourceBuiltArtifactsVersion>
<PrivateSourceBuiltPrebuiltsVersion>0.1.0-10.0.100-1</PrivateSourceBuiltPrebuiltsVersion>
<PrivateSourceBuiltPrebuiltsVersion>0.1.0-10.0.100-4</PrivateSourceBuiltPrebuiltsVersion>
<!-- command-line-api dependencies -->
<SystemCommandLineVersion>2.0.0-beta4.24126.1</SystemCommandLineVersion>
<!-- msbuild dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-rc.2.24474.11"
"dotnet": "10.0.100-alpha.1.24551.9"
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
<BuildArgs Condition="'$(DotNetBuildMonoBundleLLVMOptimizer)' != ''">$(BuildArgs) /p:DotNetBuildMonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer)</BuildArgs>
<BuildArgs Condition="'$(PgoInstrument)' == 'true'">$(BuildArgs) $(FlagParameterPrefix)pgoinstrument</BuildArgs>
<BuildArgs Condition="'$(UseSystemLibs)' != ''">$(BuildArgs) /p:UseSystemLibs=$(UseSystemLibs)</BuildArgs>

<!-- Needed until https://github.com/dotnet/runtime/issues/109329 is fixed. -->
<BuildArgs>$(BuildArgs) /p:NetCoreAppToolCurrentVersion=10.0</BuildArgs>
</PropertyGroup>

<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<PropertyGroup>
<Nullable>enable</Nullable>
<VSTestResultsDirectory>$(ArtifactsTestResultsDir)</VSTestResultsDirectory>
<!-- Set roll forward to allow tests to run against a newer runtime. This is necessary when tests still
target a previous TFM but the SDK already provides the newer runtime. -->
<RollForward>Major</RollForward>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);assets/**/*</DefaultExcludesInProjectFolder>
<UBTestsWarnOnContentDiffs>true</UBTestsWarnOnContentDiffs>
<VSTestLogger>console%3bverbosity=diagnostic;trx%3bverbosity=diagnostic%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
<VSTestCLIRunSettings>$(VSTestCLIRunSettings);RunConfiguration.DotNetHostPath=$(DotnetTool)</VSTestCLIRunSettings>
<VSTestCLIRunSettings>$(VSTestCLIRunSettings);RunConfiguration.DotNetHostPath=$(DotNetTool)</VSTestCLIRunSettings>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From c0c75f6fa385d6959cc2c7c475c01208f9f30830 Mon Sep 17 00:00:00 2001
From: Viktor Hofer <viktor.hofer@microsoft.com>
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

---
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 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 @@
<![CDATA[
try
{
- System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\DotnetTools\dotnet-format\BuildHost-net472\System.Text.Json.dll");
+ System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\Sdks\Microsoft.NET.Sdk.StaticWebAssets\tasks\net472\System.Text.Json.dll");
}
catch
{
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
From d6d8add5aad503877ee4344bce77dfa0b054752a Mon Sep 17 00:00:00 2001
From: Viktor Hofer <viktor.hofer@microsoft.com>
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 @@
<!-- Only upgrade NuGetAudit warnings to errors for official builds. -->
<WarningsNotAsErrors Condition="'$(OfficialBuild)' != 'true'">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>

- <!-- Temporary, reove when arcade NetCurrent to net10. This requires a net10 targeting SDK -->
+ <!-- Temporary, remove when arcade NetCurrent to net10. This requires a net10 targeting SDK. -->
<NetCurrent>net10.0</NetCurrent>
</PropertyGroup>

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 @@
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
</PropertyGroup>

- <ItemGroup>
- <!-- After the net10 SDK is available, this should change back to an Update without the TargetFramework property. -->
- <KnownFrameworkReference
- Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'net9.0'))"
- DefaultRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)"
- LatestRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)"
- TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)"
- TargetFramework="net10.0" />
- <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WindowsForms" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
-
- <KnownCrossgen2Pack Include="@(KnownCrossgen2Pack->WithMetadataValue('TargetFramework', 'net9.0'))"
- Crossgen2PackVersion="$(MicrosoftNETCoreAppRefVersion)"
- TargetFramework="net10.0" />
- </ItemGroup>
-
</Project>
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 @@

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" />

+ <ItemGroup>
+ <KnownFrameworkReference
+ Update="Microsoft.NETCore.App"
+ DefaultRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)"
+ LatestRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)"
+ TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)" />
+ <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
+ <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
+ <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WindowsForms" />
+ <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
+ </ItemGroup>
+
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Archives" />
</ItemGroup>
Loading