dotnet / dotnet/android

When using BLE, warning is output in release build

Open
#10,620 1 comment 0 reactions 0 assignees View on GitHub
Area: App+Library Build
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 19h
Merged PRs (30d)
252

Description

### Android framework version

net10.0-android (Preview)

### Affected platform version

VS 2026

### Description

When you add a library that uses BLE and run a Release build, the following warning is displayed.

```
11:13 で再構築が開始されました...
1>------ すべてのリビルド開始: プロジェクト:MauiApp1, 構成: Release Any CPU ------
D:\Workspace\MauiApp1\MauiApp1\MauiApp1.csproj を復元しました (103 ミリ秒)。
1> MauiApp1 -> D:\Workspace\MauiApp1\MauiApp1\bin\Release\net10.0-android\MauiApp1.dll
1> アセンブリのサイズを最適化すると、アプリの動作が変わる可能性があります。公開した後に必ずテストしてください。https://aka.ms/dotnet-illink を参照してください
1> アセンブリのサイズを最適化しています。このプロセスには時間がかかる場合があります。
1> アセンブリのサイズを最適化すると、アプリの動作が変わる可能性があります。公開した後に必ずテストしてください。https://aka.ms/dotnet-illink を参照してください
1> アセンブリのサイズを最適化しています。このプロセスには時間がかかる場合があります。
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1498,3): warning : Connector name 'GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext' must start with 'Get', end with 'Handler' and have at least one character between the two parts.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1498,3): warning : Method 'System.Void Android.Bluetooth.BluetoothGattServerCallback::OnServiceAdded(Android.Bluetooth.ProfileState,Android.Bluetooth.BluetoothGattService)' will be registered dynamically [Arch: None; Assembly: unknown]
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1498,3): warning : Connector name 'GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext' must start with 'Get', end with 'Handler' and have at least one character between the two parts.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1498,3): warning : Method 'System.Void Android.Bluetooth.BluetoothGattServerCallback::OnServiceAdded(Android.Bluetooth.ProfileState,Android.Bluetooth.BluetoothGattService)' will be registered dynamically [Arch: None; Assembly: unknown]
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1585,3): warning : Connector name 'GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext' must start with 'Get', end with 'Handler' and have at least one character between the two parts.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1585,3): warning : Method 'System.Void Android.Bluetooth.BluetoothGattServerCallback::OnServiceAdded(Android.Bluetooth.ProfileState,Android.Bluetooth.BluetoothGattService)' will be registered dynamically [Arch: None; Assembly: obj\Release\net10.0-android\android-x64\linked\Mono.Android.dll]
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1585,3): warning : Connector name 'GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext' must start with 'Get', end with 'Handler' and have at least one character between the two parts.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1585,3): warning : Method 'System.Void Android.Bluetooth.BluetoothGattServerCallback::OnServiceAdded(Android.Bluetooth.ProfileState,Android.Bluetooth.BluetoothGattService)' will be registered dynamically [Arch: None; Assembly: obj\Release\net10.0-android\android-arm64\linked\Mono.Android.dll]
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1603,3): warning : [Arm64] Number of methods in the project that will be registered dynamically: 1
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.2\tools\Xamarin.Android.Common.targets(1603,3): warning : [X86_64] Number of methods in the project that will be registered dynamically: 1
1> [1/98] _Microsoft.Android.Resource.Designer.dll -> _Microsoft.Android.Resource.Designer.dll.so
...
```

### Steps to Reproduce

1. Create a MAUI project.
2. Select net10.0-android as the Target Framework.
3. Add the library that uses Bluetooth.

```





```

4. Run a release build

### Did you find any workaround?

_No response_

### Relevant log output

```shell

```

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.