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 net9.0 #35031

Merged
merged 21 commits into from
Oct 12, 2023
Merged

Conversation

v-wuzhai
Copy link
Member

No description provided.

Fix up build errors
@marcpopMSFT
Copy link
Member

@dotnet/source-build-internal looks like there are a few build errors specific to the source build leg if you could take a look. Does source build have the TFM listed somewhere that needs to be updated?

  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062: The "UpdatePortableRuntimeIdentifierGraph" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll'. The system cannot find the file specified. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/WebSdk/Web/Tasks/Microsoft.NET.Sdk.Web.Tasks.csproj(43,5): error : No files found for analyzer for Microsoft.AspNetCore.Analyzers at path /__w/1/s/artifacts/source-build/self/package-cache/microsoft.aspnetcore.analyzers/9.0.0-alpha.1.23470.9/analyzers/
  /__w/1/s/artifacts/source-build/self/src/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj : error MSB4057: The target "ResolveAssemblyReferences" does not exist in the project.

@mthalman
Copy link
Member

mthalman commented Oct 5, 2023

@dotnet/source-build-internal looks like there are a few build errors specific to the source build leg if you could take a look. Does source build have the TFM listed somewhere that needs to be updated?

  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062: The "UpdatePortableRuntimeIdentifierGraph" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll'. The system cannot find the file specified. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/WebSdk/Web/Tasks/Microsoft.NET.Sdk.Web.Tasks.csproj(43,5): error : No files found for analyzer for Microsoft.AspNetCore.Analyzers at path /__w/1/s/artifacts/source-build/self/package-cache/microsoft.aspnetcore.analyzers/9.0.0-alpha.1.23470.9/analyzers/
  /__w/1/s/artifacts/source-build/self/src/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj : error MSB4057: The target "ResolveAssemblyReferences" does not exist in the project.

This is an Arcade issue with TFM filtering. The net9.0 TFM is not currently included in the allowed TFMs for TFM filtering. So the toolset-tasks project skips being built when TFM filtering is applied to it for source-build. I've opened a PR in Arcade which I believe will fix this: dotnet/arcade#14085. /cc @mmitche

@marcpopMSFT marcpopMSFT requested a review from a team as a code owner October 5, 2023 22:31
@marcpopMSFT
Copy link
Member

There are additional test failures in containers, razor, blazor, and illink tests. I'm still poking through the SDK tests to clean the rest of those up but I fixed the templating tests (I think). CC @dotnet/sdk-container-builds-maintainers @agocke @lewing

@v-wuzhai v-wuzhai requested a review from a team as a code owner October 5, 2023 22:45
@baronfel
Copy link
Member

baronfel commented Oct 5, 2023

I think that should fix the 2 containers test failures - both were hardcoded net8.0 TFMs. One was in the props to create the path to the DLL to load Tasks from, and one was in a test that inspected the generated NuGet package to verify the shape of the contents (which also had a hard-coded TFM reference).

@mmitche
Copy link
Member

mmitche commented Oct 6, 2023

@dotnet/source-build-internal looks like there are a few build errors specific to the source build leg if you could take a look. Does source build have the TFM listed somewhere that needs to be updated?

  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062: The "UpdatePortableRuntimeIdentifierGraph" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll'. The system cannot find the file specified. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  /__w/1/s/artifacts/source-build/self/src/src/WebSdk/Web/Tasks/Microsoft.NET.Sdk.Web.Tasks.csproj(43,5): error : No files found for analyzer for Microsoft.AspNetCore.Analyzers at path /__w/1/s/artifacts/source-build/self/package-cache/microsoft.aspnetcore.analyzers/9.0.0-alpha.1.23470.9/analyzers/
  /__w/1/s/artifacts/source-build/self/src/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj : error MSB4057: The target "ResolveAssemblyReferences" does not exist in the project.

This is an Arcade issue with TFM filtering. The net9.0 TFM is not currently included in the allowed TFMs for TFM filtering. So the toolset-tasks project skips being built when TFM filtering is applied to it for source-build. I've opened a PR in Arcade which I believe will fix this: dotnet/arcade#14085. /cc @mmitche

LGTM, thanks. That was blocked on arcade branching, but that has been completed.

@marcpopMSFT
Copy link
Member

@dotnet/aspnet-blazor-eng Most of the remaining test failures are in the blazor or razor tests. Please take a look

@marcpopMSFT
Copy link
Member

  1. The test assemblies for aspnet appear to be hitting the torn aspnet state problem.
C:\h\w\AEBC0949\w\A9260940\e>dotnet exec dotnet-watch.Tests.dll -testExecutionDirectory C:\h\w\AEBC0949\t\dotnetSdkTests\jrhuvwu2.3rc -msbuildAdditionalSdkResolverFolder C:\h\w\AEBC0949\p\r  -xml testResults.xml -class "Microsoft.Extensions.Tools.Internal.ReporterTests" -class "Microsoft.Extensions.Tools.Internal.ReporterTests+TestConsole" -class "Microsoft.Extensions.Tools.Internal.TestConsole+TestOutputWriter"   
The specified framework 'Microsoft.NETCore.App', version '8.0.0-rc.2.23457.7', apply_patches=1, version_compatibility_range=patch cannot roll-forward to the previously referenced version '9.0.0-alpha.1.23507.5'.
  1. Source build is failing
/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062: The "UpdatePortableRuntimeIdentifierGraph" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/src/artifacts/tasks/bin/toolset-tasks/Release/net9.0/toolset-tasks.dll'. The system cannot find the file specified. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]  /__w/1/s/artifacts/source-build/self/src/src/Layout/redist/targets/GenerateLayout.targets(10,7): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/__w/1/s/artifacts/source-build/self/src/src/Layout/redist/redist.csproj]
  1. Some webassembly tests can't find the 7.0 runtime
/datadisks/disk1/work/B1E40A0B/w/B06709D5/e/testExecutionDirectory/Publish60Host---0200F604/Client/BlazorWasmHosted60.Client.csproj : error NU1103: Unable to find a stable package Microsoft.NET.Sdk.WebAssembly.Pack with version (>= 7.0.10) [/datadisks/disk1/work/B1E40A0B/w/B06709D5/e/testExecutionDirectory/Publish60Host---0200F604/Server/BlazorWasmHosted60.Server.csproj]
  1. A bunch of blazor tests are failing on Mac
error NETSDK1204: Ahead-of-time compilation is not supported on the current platform 'osx-x64'.

@marcpopMSFT
Copy link
Member

For 1, I'll try adding an additional runtime to the toolset_restore script. For 4, I believe we need an installer fix. Still digging into the others.

@mthalman
Copy link
Member

mthalman commented Oct 9, 2023

Source-build is dependent upon #35863

@v-wuzhai
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcpopMSFT
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcpopMSFT
Copy link
Member

One of the last remaining errors is in the AOT tests on Mac only. @sbomer

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAot_app_runs_in_release_with_no_config_when_PublishAot_is_enabled

Expected boolean to be true because /private/tmp/helix/working/B4FE09CD/w/AFD709BF/e/testExecutionDirectory/NativeAot_app---B9014B5B/NativeAotAppForConfigTestRel/bin/Release/net8.0/osx-x64/publish should contain NativeAotAppForConfigTestRel symbol, but found False.

@lewing
Copy link
Member

lewing commented Oct 11, 2023

baseline changes for wasm look fine

@kasperk81
Copy link
Contributor

One of the last remaining errors is in the AOT tests on Mac only

file an issue and exclude mac from that test against it?

@lewing
Copy link
Member

lewing commented Oct 11, 2023

baseline changes for wasm look fine

actually only the most recent ones, I'm not sure what happened in the crosstargeting case?

@sbomer
Copy link
Member

sbomer commented Oct 11, 2023

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAot_app_runs_in_release_with_no_config_when_PublishAot_is_enabled

Expected boolean to be true because /private/tmp/helix/working/B4FE09CD/w/AFD709BF/e/testExecutionDirectory/NativeAot_app---B9014B5B/NativeAotAppForConfigTestRel/bin/Release/net8.0/osx-x64/publish should contain NativeAotAppForConfigTestRel symbol, but found False.

It's expecting to find a .dsym symbol directory after publishing a native AOT app for net8.0, but the test is actually producing a .dwarf file. The test is using an outdated version of the net8.0 ILCompiler targets without this fix: dotnet/runtime#89358. The version comes from https://github.com/dotnet/installer/blob/c189dd57c41de7212040ba10575a1673960da6fd/src/redist/targets/GenerateBundledVersions.targets#L98-L99 - once that is updated, this failure should go away. I think it would be fine to disable the testcase temporarily to unblock flow.

cc @agocke

@agocke
Copy link
Member

agocke commented Oct 11, 2023

Yup, let's add this to the list and keep moving.

@marcpopMSFT
Copy link
Member

Ok, marked the tests to skip and added it to the issue tracking what we've done

@marcpopMSFT marcpopMSFT merged commit 9ffff8d into main Oct 12, 2023
16 checks passed
@marcpopMSFT marcpopMSFT deleted the Jason/Update-the-sdk-target-to-net9.0 branch October 12, 2023 03:28
@marcpopMSFT
Copy link
Member

dotnet/installer#17684

@v-wuzhai v-wuzhai restored the Jason/Update-the-sdk-target-to-net9.0 branch August 26, 2024 09:36
@v-wuzhai v-wuzhai deleted the Jason/Update-the-sdk-target-to-net9.0 branch August 26, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants