-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
- Cannot use any Android API from Xamarin
- Must use net9 instead of net9.0-android
- Requires the NDK on the Path
- Must use Library instead of Exe output type
Commandline Invocation sample:
dotnet publish -r linux-bionic-arm64 <SLN> -c Release -o <OUT> -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true
Sample csproj
<OutputType>Library</OutputType>
<TargetFramework>net9.0</TargetFramework>
<StripSymbols>true</StripSymbols>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TieredCompilation>false</TieredCompilation>
<PublishReadyToRun>false</PublishReadyToRun>
<OptimizationPreference>Speed</OptimizationPreference>
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
<MetadataUpdateSupport>false</MetadataUpdateSupport>
<DebuggerSupport>false</DebuggerSupport>
<EventSourceSupport>false</EventSourceSupport>
<StackTraceSupport>false</StackTraceSupport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishAot>true</PublishAot>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<AndroidEnableMarshalMethods>false</AndroidEnableMarshalMethods>