maui icon indicating copy to clipboard operation
maui copied to clipboard

NU1103: Unable to find a stable package runtime.linux-arm.Microsoft.DotNet.ILCompiler with version (>= 8.0.3)

Open voroninp opened this issue 3 months ago • 3 comments

Description

Well, checking two check boxes breaks the build

Steps to Reproduce

  1. Create Maui App project from a standard template.
  2. Enable Publish Trimed and Publish native AOT
  3. Build
  4. Get the errors

Error NU1103 Unable to find a stable package runtime.linux-arm.Microsoft.DotNet.ILCompiler with version (>= 8.0.3)

  • Found 2 version(s) in nuget.org [ Nearest version: 9.0.0-preview.1.24080.9 ]

image

Link to public reproduction project repository

No response

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly), I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

Installed workload: 
maui 8.0.7/8.0.100 SDK 8.0.200

dotnet version = 8.0.202

voroninp avatar Mar 31 '24 14:03 voroninp

Verified this issue with Visual Studio 17.10.0 Preview 2 (8.0.14). Can repro it. image

ninachen03 avatar Apr 01 '24 05:04 ninachen03

@ninachen03 Yes, I tried both VS and VS preview.

voroninp avatar Apr 01 '24 05:04 voroninp

I just wanted to add that when I disable and trimming, so project file contains:

<PublishTrimmed>False</PublishTrimmed>
<PublishAot>False</PublishAot>

I get the following error when I try to build in Release mode:

XA1030 The 'RunAOTCompilation' MSBuild property is only supported when trimming is enabled. Edit the project file in a text editor to set 'PublishTrimmed' to 'true' for this build configuration. C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\tools\Xamarin.Android.Common.targets

As I understand, this line causes the conflict. But the wording is very confusing. You set the default value of <RunAOTCompilation> to true for Android, but Sdk ignores more generic <PublishAot> property.

voroninp avatar Apr 21 '24 19:04 voroninp