Skip to content

Publish NativeAOT fails .NET 10.0 #10587

@osyyyS

Description

@osyyyS

Android framework version

net10.0-android (Preview)

Affected platform version

.NET 10.0.100, Android SDK 36, NDK 27.2

Description

When trying to

dotnet publish .\apps\Fitaino.App\Fitaino.App.csproj -c Release -f net10.0-android -p:PublishAot=true

I'm getting the following error:

error MSB3030: Could not copy the file "bin/Release/net10.0-android/native/Fitaino.App.so" because it was not found.

Am I doing something wrong? I am not sure if I have the proper NDK version installed.

Steps to Reproduce

  1. Create new Maui application
  2. Publish for android with AOT enabled

Did you find any workaround?

No

Relevant log output

/Users/oploeger/Desktop/actions-runner/_work/Fitaino/Fitaino/apps/Fitaino.App/obj/Release/net10.0-android/android-arm64/linked/Mono.Android.dll : warning IL3053: Assembly 'Mono.Android' produced AOT analysis warnings. [/Users/oploeger/Desktop/actions-runner/_work/Fitaino/Fitaino/apps/Fitaino.App/Fitaino.App.csproj::TargetFramework=net10.0-android]
/Users/oploeger/Desktop/actions-runner/_work/Fitaino/Fitaino/apps/Fitaino.App/obj/Release/net10.0-android/android-x64/linked/Mono.Android.dll : warning IL3053: Assembly 'Mono.Android' produced AOT analysis warnings. [/Users/oploeger/Desktop/actions-runner/_work/Fitaino/Fitaino/apps/Fitaino.App/Fitaino.App.csproj::TargetFramework=net10.0-android]
  ILC: Method '[Mono.Android.Runtime]Android.Runtime.RuntimeNativeMethods.monodroid_unhandled_exception(Exception)' will always throw because: Invalid IL or CLR metadata in 'Void Android.Runtime.RuntimeNativeMethods.monodroid_unhandled_exception(System.Exception)'
  ILC: Method '[Mono.Android.Runtime]Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception(Exception)' will always throw because: Invalid IL or CLR metadata in 'Void Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception(System.Exception)'
  ILC: Method '[Mono.Android.Runtime]Android.Runtime.RuntimeNativeMethods.monodroid_unhandled_exception(Exception)' will always throw because: Invalid IL or CLR metadata in 'Void Android.Runtime.RuntimeNativeMethods.monodroid_unhandled_exception(System.Exception)'
  ILC: Method '[Mono.Android.Runtime]Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception(Exception)' will always throw because: Invalid IL or CLR metadata in 'Void Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception(System.Exception)'
/Users/oploeger/.nuget/packages/microsoft.dotnet.ilcompiler/10.0.0/build/Microsoft.NETCore.Native.Publish.targets(91,5): error MSB3030: Could not copy the file "bin/Release/net10.0-android/native/Fitaino.App.so" because it was not found. [/Users/oploeger/Desktop/actions-runner/_work/Fitaino/Fitaino/apps/Fitaino.App/Fitaino.App.csproj::TargetFramework=net10.0-android]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: App+Library BuildIssues when building Library projects or Application projects.need-infoIssues that need more information from the author.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions