У меня есть приложение MAUI, предназначенное для net8.0-ios. На моей локальной машине разработки (и удаленно подключенном Mac) я могу выполнять сборку на основе iOS SDK 18 с Xcode 16. В Azure DevOps я указал
macos-14 в качестве изображения агента, но он жалуется на использование iOS 17.5 вместо 18.0.
ILLINK : error MT2362: The linker step 'ClassHandleRewriter' failed during processing: One or more errors occurred. (The type 'MapKit.MKSelectionAccessory' (used as a return type in MapKit.MKMapView/_MKMapViewDelegate.GetSelectionAccessory) is not available in iOS 17.5 (it was introduced in iOS 18.0). Please build with a newer iOS SDK (usually done by using the most recent version of Xcode). [/Users/runner/work/1/s/App/App.csproj::TargetFramework=net8.0-ios]
Важная часть этого:
... недоступно в iOS 17.5 (он был представлен в iOS 18.0). Пожалуйста, создайте новый iOS SDK (обычно это делается с использованием самой последней версии Xcode)
Как мне указать DevOps использовать iOS 18? Я проверил характеристики агента: у него iOS 18 и Xcode 16.
Starting: Initialize job
Agent name: 'Hosted Agent'
Agent machine name: 'Mac-1727975076930'
Current agent version: '3.245.0'
Operating System
Runner Image
Image: macos-14
Version: 20240923.101
Included Software: https://github.com/actions/runner-image ... -Readme.md
Image Release: https://github.com/actions/runner-image ... 240923.101
Вот этап ios моего конвейера yaml:
- stage: publish_ios
dependsOn: []
condition: and(succeeded(), in(variables['Environment'], 'QA', 'Production'))
jobs:
- job: BuildMAUIApps
displayName: Build
pool:
vmImage: 'macos-14'
demands:
- MSBuild
steps:
# https://docs.microsoft.com/en-us/azure/ ... atchos-app
# Setup Secret Pipeline Variable or Library Secrets Variable for iOS Certificate Password
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'iOS-Distribution.p12'
certPwd: '$(CertificatePassword)'
keychain: 'temp'
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'app.mobileprovision'
- task: UseDotNet@2
displayName: install dotnet
inputs:
packageType: 'sdk'
version: $(dotnetVersion)
- task: Bash@3
displayName: install maui
inputs:
targetType: 'inline'
script: |
dotnet nuget locals all --clear
dotnet workload install maui --source https://pkgs.dev.azure.com/dnceng/publi ... index.json --source https://api.nuget.org/v3/index.json
dotnet workload install ios maui wasm-tools --source https://pkgs.dev.azure.com/dnceng/publi ... index.json --source https://api.nuget.org/v3/index.json
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
externalFeedCredentials: 'https://pkgs.dev.azure.com/org/_packagi ... index.json'
# https://docs.microsoft.com/en-us/dotnet ... t/overview
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/App.csproj'
arguments: '--configuration $(buildConfiguration) --framework net8.0-ios -p:CodesignProvision=$(APPLE_PROV_PROFILE_UUID) -p:ArchiveOnBuild=true -p:Version=$(Build.BuildNumber) -p:ApplicationDisplayVersion=$(Build.BuildNumber) -p:ApplicationVersion=$(Build.BuildId)'
- task: CopyFiles@2
inputs:
Contents: |
**/*.app
**/*.ipa
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'ios'
publishLocation: 'Container'
Подробнее здесь: https://stackoverflow.com/questions/790 ... d-pipeline
Как указать версию ios SDK в конвейере сборки Azure DevOps MAUI ⇐ IOS
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Подпишите сборки внутри пакета nuget с помощью Azure Key Vault в конвейере Azure Devops.
Anonymous » » в форуме C# - 0 Ответы
- 84 Просмотры
-
Последнее сообщение Anonymous
-