Reputation: 978
After the latest .Net Maui update, my iOS app will longer build using the macos-12 image. Does anyone know how to specify an older version of .Net Maui using the CmdLine@2 Task? Here is what my current Task looks like.
- task: CmdLine@2
displayName: 'Install Maui'
inputs:
script: 'dotnet workload install maui'
The new version of .Net Maui seems to be looking for Xcode 14.1 and the iOS 16.1 SDK because it's using microsoft.net.sdk.ios version 16.1.1481.
I'm trying to figure out what version to use and this is getting ridiculous. You would think that I could specify one of these versions, but that's simply not the case. This is so frustrating and makes no sense!!!
https://github.com/dotnet/maui/releases
You would think that something like this would work.
- task: CmdLine@2
displayName: 'Install Maui'
inputs:
script: 'dotnet workload install --sdk-version 7.0.1xx maui'
https://maui.blob.core.windows.net/metadata/rollbacks/7.0.1xx.json
This seems to suggest that the version of Asp.net determines the .Net Maui version.
Upvotes: 0
Views: 1203
Reputation: 978
Here is how I was able to install an old version of .Net Maui.
I told the Pipeline to use Version 7.0.100 of Asp.net.
- task: UseDotNet@2
displayName: .NET Version
inputs:
packageType: 'sdk'
version: '7.0.100'
I told the Pipeline to use the 7.0.1xx Release version of .Net Maui.
https://github.com/dotnet/maui/tree/release/7.0.1xx
- task: CmdLine@2
displayName: 'Install Maui'
inputs:
script: 'dotnet workload install maui --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/7.0.1xx.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json'
Upvotes: 0
Reputation: 35414
Maui version will be determined by .net version.
AzureDevOps Pipleline force Task to install a certain version / old version of .Net Maui
To install a certain version of .net Maui in Azure Pipeline, you can use the Use dotnet v2 task to set the .net version of the pipeline. Then it will install a certain version of Maui.
Here is an example:
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 7.0.100'
inputs:
version: 7.0.100
- script: 'dotnet workload install maui'
displayName: 'Command Line Script'
Upvotes: 0