I have created a .NET8 MAUI Class Library
to use in MAUI projects. The repo is in Azure DevOps
and I was trying to build and publish the package via NuGet.
For that, I wrote a YAML file
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: 'Use dotnet 8'
inputs:
version: '8.0.x'
- task: CmdLine@2
inputs:
script: 'dotnet workload install maui'
- task: DotNetCoreCLI@2
displayName: Restore packages
inputs:
command: 'restore'
feedsToUse: 'select'
vstsFeed: 'c800d0d7-e2af-4567-997f-de7cf7888e6c'
- task: DotNetCoreCLI@2
displayName: Build project
inputs:
command: 'build'
projects: '**/PSC.Maui.Components.BottomSheet.csproj'
arguments: '--configuration $(buildConfiguration)'
When the pipeline runs, I get this error
Generating script.
Script contents:
dotnet workload install maui
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/42901c0d-f407-4f75-912b-f93132efa865.sh
Workload ID maui isn't supported on this platform.
##[error]Bash exited with code '1'.
Finishing: CmdLine
Then, I tried to create the NuGet package locally, but it was not recognized by the NuGet website when I uploaded it.
How can I change the pipeline?
2
Answers
.Net MAUI does not support Linux, therefore you can neither build to it or from it.
See here
If you use windows image to build library, will it include iOS version as well?