dotnet / dotnet/linker

Microsoft.Extensions.Options.dll cannot be AoT compiled for Android 31.0

Open
#2,898 9 comments 0 reactions 0 assignees View on GitHub
area-Integration: netcore
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/MicrosoftExtensionsOptionsdll-cannot-/10053542)._

---
[regression] [worked-in:Version 17.3.0 Preview 1.0]
Using Uno Project, both latest stable (4.3.6) and latest prerelease (4.4.0-dev.95).

This error happens for each of `x86`, `x64`, `arm`, `arm64`.

```
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : Precompiling failed for C:\GitHub\Activate\Activate\Activate.Mobile\obj\Release\net6.0-android31.0\android-arm64\linked\Microsoft.Extensions.Options.dll.
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : Mono Ahead of Time compiler - compiling assembly C:\GitHub\Activate\Activate\Activate.Mobile\obj\Release\net6.0-android31.0\android-arm64\linked\Microsoft.Extensions.Options.dll
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : AOTID 6EDA5C9D-4A33-FF64-6788-475EDCB1F313
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : Could not load signature of Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions:Configure due to: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies.
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : Failed to load method 0x6000024 from 'C:\GitHub\Activate\Activate\Activate.Mobile\obj\Release\net6.0-android31.0\android-arm64\linked\Microsoft.Extensions.Options.dll' due to Could not resolve signature of method Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions:Configure.
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : Run with MONO_LOG_LEVEL=debug for more information.
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\targets\Microsoft.Android.Sdk.Aot.targets(78,5): error : AOT of image obj\Release\net6.0-android31.0\android-arm64\linked\Microsoft.Extensions.Options.dll failed.
```

---
### Original Comments

#### Feedback Bot on 5/25/2022, 07:51 PM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.