Skip to content

Commit

Permalink
[ci] Update .NET version installed for MAUI tests (#8995)
Browse files Browse the repository at this point in the history
The MAUI integration job started failing recently seemingly due to some
of the arcade integration changes they are making:

    C:\Users\cloudtest\.nuget\packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.24274.1\tools\RepositoryValidation.proj(33,5): error MSB4018: The "Microsoft.DotNet.Arcade.Sdk.GetLicenseFilePath" task failed unexpectedly.
    C:\Users\cloudtest\.nuget\packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.24274.1\tools\RepositoryValidation.proj(33,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    C:\Users\cloudtest\.nuget\packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.24274.1\tools\RepositoryValidation.proj(33,5): error MSB4018: File name: 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Attempt to fix this by installing a .NET 9 preview that will be used to
run their build tasks that provision a local .NET install.

The `installLegacyDotNet` setup-test-environment parameter did not seem
to be in use anywhere and has also been removed.
  • Loading branch information
pjcollins authored May 31, 2024
1 parent 0803452 commit 17f8b79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ extends:
parameters:
xaSourcePath: $(Build.SourcesDirectory)/xamarin-android
androidSdkPlatforms: $(DefaultTestSdkPlatforms)
dotnetVersion: 9.0
dotnetQuality: preview

- task: NuGetAuthenticate@1
displayName: authenticate with azure artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ parameters:
xaSourcePath: $(System.DefaultWorkingDirectory)
jdkTestFolder: $(JAVA_HOME_17_X64)
remove_dotnet: false
dotnetVersion: $(DotNetSdkVersion)
dotnetQuality: $(DotNetSdkQuality)
installTestSlicer: false
installApkDiff: true
installLegacyDotNet: false
installLegacyXamarinAndroid: false
updateMono: false
androidSdkPlatforms: $(DefaultTestSdkPlatforms)
Expand Down Expand Up @@ -33,16 +34,12 @@ steps:
displayName: set JI_JAVA_HOME to ${{ parameters.jdkTestFolder }}
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))

# Install .NET 6 for legacy tests
- ${{ if eq(parameters.installLegacyDotNet, true) }}:
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
parameters:
version: 6.0
quality: GA
remove_dotnet: ${{ parameters.remove_dotnet }}

# Install latest .NET
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
parameters:
version: ${{ parameters.dotnetVersion }}
quality: ${{ parameters.dotnetQuality }}
remove_dotnet: ${{ parameters.remove_dotnet }}

- task: DotNetCoreCLI@2
displayName: shut down existing build daemons
Expand Down

0 comments on commit 17f8b79

Please sign in to comment.