I have a blank WinUI3 desktop app:
I would like to build this app in an AzureDevops build pipeline:
pool:
vmImage: 'windows-2022'
variables:
solution: '$(Build.SourcesDirectory)/apps/windows/WinUI3VS2022NET6BlankApp/WinUI3VS2022NET6BlankApp.sln'
buildPlatform: 'x64'
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'
- checkout: self
fetchDepth: 1
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
# Failure here :D
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:PublishReadyToRun=false'
I'm getting this error:
C:\hostedtoolcache\windows\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(293,5): error NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. [D:\a\1\s\apps\windows\WinUI3VS2022NET6BlankApp\WinUI3VS2022NET6BlankApp\WinUI3VS2022NET6BlankApp\WinUI3VS2022NET6BlankApp.csproj]
I have tried setting PublishReadyToRun to false in the .csproj and .wapproj files, without luck.
The app builds fine locally with Visual Studio 2022.
Any ideas how I can build this blank WinUI 3 app in AzureDevops?