Skip to content

[build] install .NET 10.x for BAR manifest #10040

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Apr 16, 2025

The Publish symbols and Push to Maestro job and generate and publish BAR manifest step fail with:

C:\hostedtoolcache\windows\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(166,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 10.0.  Either target .NET 9.0 or lower, or use a version of the .NET SDK that supports .NET 10.0. Download the .NET SDK from https://aka.ms/dotnet/download [D:\a\_work\1\s\build-tools\create-packs\Microsoft.Android.Sdk.proj]
    0 Warning(s)
    1 Error(s)

It looks like we were using .NET 9 previews in the past:

- task: UseDotNet@2
  displayName: Install .NET 9.x
  inputs:
    version: 9.x
    includePreviewVersions: true

So, we can use .NET 10 previews for this during .NET 10 development.

The `Publish symbols and Push to Maestro` job and `generate and
publish BAR manifest` step fail with:

    C:\hostedtoolcache\windows\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(166,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 10.0.  Either target .NET 9.0 or lower, or use a version of the .NET SDK that supports .NET 10.0. Download the .NET SDK from https://aka.ms/dotnet/download [D:\a\_work\1\s\build-tools\create-packs\Microsoft.Android.Sdk.proj]
        0 Warning(s)
        1 Error(s)

It looks like we were using .NET 9 previews in the past:

    - task: UseDotNet@2
      displayName: Install .NET 9.x
      inputs:
        version: 9.x
        includePreviewVersions: true

So, we can use .NET 10 previews for this during .NET 10 development.
@jonathanpeppers
Copy link
Member Author

@jonathanpeppers
Copy link
Member Author

Looks like it works:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review April 16, 2025 17:35
inputs:
version: 9.x
version: 10.x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to how we declare DotNetTargetFramework and DotNetStableTargetFramework in the variables template, maybe we should do something similar for DotNetSdkVersion to avoid needing to bump this again separately at some point in the future?

https://github.com/dotnet/android/blob/main/build-tools/automation/yaml-templates/variables.yaml#L26

Good with this as is to unblock things though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll switch to use a variable here:

There is a similar spot.

@jonathanpeppers jonathanpeppers merged commit ac5d8ff into main Apr 16, 2025
118 of 122 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/generate-bar-manifest branch April 16, 2025 19:18
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants