Skip to content

Tags: dotnet/android

Tags

36.1.2

Toggle 36.1.2's commit message
[xabt] fix incremental design-time builds (#10564)

Fixes: #10528
Fixes: #10563

There is a report in .NET 10 of *something* going wrong with
incremental builds (and possibly design-time builds)...

The app crashes with an error such as:

    android.content.res.Resources$NotFoundException: String resource ID #0x7f1000be at
    android.content.res.Resources.getText(Resources.java:466) at android.content.Context.getText(Context.java:933) at
    androidx.appcompat.widget.Toolbar.setNavigationContentDescription(Toolbar.java:1001) at
    crc64e02730b4d0e10e64.CustomShellRenderer_SectionRenderer.n_onCreateView(Native Method) at
    crc64e02730b4d0e10e64.CustomShellRenderer_SectionRenderer.onCreateView(CustomShellRenderer_SectionRenderer.java:36) ...

Where the resource ID is invalid.

After some debugging, after watching the video:

* #10528 (comment)

I was able to reproduce the issue, when I did:

1. Open emulator
2. Open project in VS
3. Ctrl+F5 (see app running)
4. Close VS (make sure emulator stays open)
5. Reopen VS
6. Ctrl+F5 again
7. App crashes

Reviewing builds logs, I saw this oddity on the design-time build on
step 5:

    Target _GenerateRtxt
    Building target "_GenerateRtxt" completely.
    Input file "Bug.Dependency.csproj" does not exist.

That is a referenced project file, it definitely should exist!

However, I noticed the path is wrong:

    Target _CollectProjectReferenceResources
        Task MSBuild
            OutputItems
                LibraryResourceDirectories
                    D:\src\dotnet-android-bug-10528\src\Bug.Dependency\Resources
                        StampFile = Bug.Dependency.csproj

`%(StampFile)` is a relative path, which can be fixed via:

    StampFile="$(MSBuildProjectFile)"
    StampFile="$(MSBuildProjectFullPath)"

This problem was introduced in .NET 10 via:

* 9ed1469

The target also uses `$(MSBuildProjectDirectory)`, which is a full path,
so it is ok. See:

* https://learn.microsoft.com/visualstudio/msbuild/msbuild-reserved-and-well-known-properties

I was also able to reproduce this issue by adding a class library to
the existing `BuildInDesignTimeMode()` test.

36.0.0-rc.2.332

Toggle 36.0.0-rc.2.332's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update dependencies from https://github.com/dotnet/dotnet build 20250…

…925.8 (#10522)

This commit updates the following dependencies

## From https://github.com/dotnet/dotnet
- **Subscription**: [8681fd17-f16f-42b0-96cd-40ba961c01fa](https://maestro.dot.net/subscriptions?search=8681fd17-f16f-42b0-96cd-40ba961c01fa)
- **Build**: [20250925.8](https://dev.azure.com/dnceng/internal/_build/results?buildId=2801862) ([284763](https://maestro.dot.net/channel/6577/github:dotnet:dotnet/build/284763))
- **Date Produced**: September 26, 2025 12:48:21 AM UTC
- **Commit**: [dcfd7e5d2118697d89716c1d5c2127da44e7fe3b](dotnet/dotnet@dcfd7e5)
- **Branch**: [release/10.0.1xx-rc2](https://github.com/dotnet/dotnet/tree/release/10.0.1xx-rc2)

- **Updates**:
  - From [10.0.0-beta.25468.104 to 10.0.0-beta.25475.108][1]
     - Microsoft.DotNet.Build.Tasks.Feed
  - From [0.11.5-alpha.25468.104 to 0.11.5-alpha.25475.108][1]
     - Microsoft.DotNet.Cecil
  - From [10.0.0-rc.2.25468.104 to 10.0.0-rc.2.25475.108][1]
     - Microsoft.NET.ILLink.Tasks
     - Microsoft.NETCore.App.Ref
  - From [10.0.100-rc.2.25468.104 to 10.0.100-rc.2.25475.108][1]
     - Microsoft.NET.Sdk
     - Microsoft.TemplateEngine.Authoring.Tasks

[1]: dotnet/dotnet@2dea164...dcfd7e5

36.0.0-rc.1.285

Toggle 36.0.0-rc.1.285's commit message
Revert "Use Android shared library loader for JNI libraries (#10376)"

This reverts commit 064f23f.

We are seeing `dotnet new maui` projects fail to debug, as they appear
to be stuck in a loop on startup:

    08-22 11:39:14.148 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/user/0/com.companyname.mauiapp14/files/.__override__/arm64-v8a/libSystem.Security.Cryptography.Native.Android.so' to load.
    08-22 11:39:17.155 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/app/~~Q5yyfDmzDqX9Z8UwQnLoFA==/com.companyname.mauiapp14-ZPk2_y6fT3b_3leM8xhcAw==/lib/arm64/libSystem.Security.Cryptography.Native.Android.so' to load.
    08-22 11:39:20.164 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/user/0/com.companyname.mauiapp14/files/.__override__/arm64-v8a/libSystem.Security.Cryptography.Native.Android' to load.
    08-22 11:39:23.172 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/app/~~Q5yyfDmzDqX9Z8UwQnLoFA==/com.companyname.mauiapp14-ZPk2_y6fT3b_3leM8xhcAw==/lib/arm64/libSystem.Security.Cryptography.Native.Android' to load.
    08-22 11:39:23.172 W/monodroid-assembly(10269): Shared library 'libSystem.Security.Cryptography.Native.Android' not loaded, p/invoke 'AndroidCryptoNative_SSLStreamInitialize' may fail
    08-22 11:39:23.172 F/monodroid-assembly(10269): Failed to load symbol 'AndroidCryptoNative_SSLStreamInitialize' from shared library 'libSystem.Security.Cryptography.Native.Android'
    08-22 11:39:26.187 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/user/0/com.companyname.mauiapp14/files/.__override__/arm64-v8a/libSystem.Security.Cryptography.Native.Android.so' to load.
    08-22 11:39:29.190 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/app/~~Q5yyfDmzDqX9Z8UwQnLoFA==/com.companyname.mauiapp14-ZPk2_y6fT3b_3leM8xhcAw==/lib/arm64/libSystem.Security.Cryptography.Native.Android.so' to load.
    08-22 11:39:32.198 W/monodroid-assembly(10269): Timeout while waiting for shared library '/data/user/0/com.companyname.mauiapp14/files/.__override__/arm64-v8a/libSystem.Security.Cryptography.Native.Android' to load.
    repeating...

35.0.101

Toggle 35.0.101's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to dotnet/sdk@cf275d46ba 9.0.305-servicing.25417.7 (#10421)

Changes: dotnet/sdk@fffbe68...cf275d4

Updates: From 9.0.305-servicing.25408.10 to 9.0.305-servicing.25417.7 Microsoft.NET.Sdk

36.0.0-preview.7.229

Toggle 36.0.0-preview.7.229's commit message
Bump to be1cab9232 35.0.92 (#10334)

Changes: 9abff77...be1cab9

- **Updates**:
  - From [35.0.78 to 35.0.92][1]
    - Microsoft.NET.Sdk.Android.Manifest-9.0.100

[1]: 9abff77...be1cab9

35.0.92

Toggle 35.0.92's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to dotnet/java-interop@4d015ca7 (#10328)

Changes: dotnet/java-interop@03cb8e2...4d015ca

* [Xamarin.Android.Tools.Bytecode] add `org.jspecify.annotations.NonNull`

36.0.0-preview.6.169

Toggle 36.0.0-preview.6.169's commit message
[xabt] fall back to libZipSharp on .NET framework (#10238)

Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2510554

In testing .NET 10, we found the issue:

    ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install
    output: Failure [-124: Failed parse during installPackageLI: Targeting
    R+ (version 30 and above) requires the resources.arsc of installed
    APKs to be stored uncompressed and aligned on a 4-byte boundary] ...

1. Create a new .NET MAUI/MAUI Blazor app.
2. Change the value for the Color attribute to #FF0000 or any color.
```xml
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FF0000" BaseSize="128,128" />
```
3. Deploy to android.
4. The splash screen color should change according to the chosen color.
5. Stop Debugging and change the splash screen color again.
6. If you do it enough times, you would encounter the error.

Manually, adding `$(_AndroidUseLibZipSharp)` to the `.csproj` file
solves the issue:

    <_AndroidUseLibZipSharp>true</_AndroidUseLibZipSharp>

Reviewing, a `.binlog` created by setting `%MSBUILDDEBUGENGINE%=1` and
launching Visual Studio, we see the message:

    Task BuildArchive
    ...
    Using System.IO.Compression because no uncompressed file extensions were specified.

So, we are relying on .NET Framework's `System.IO.Compression` to
handle `.apk` creation in some cases. `libZipSharp` *was created*
because of bugs in .NET Framework's & Mono's implementation of
`System.IO.Compression` that caused issues with Android packaging.

To fix this, we will always use `libZipSharp` for .NET Framework,
regardless if files are compressed or not.

35.0.78

Toggle 35.0.78's commit message
[ci] Use templates from DevDiv/Xamarin.yaml-templates (#10012)

Updates the repo reference that provides common yaml templates from

  * https://github.com/xamarin/yaml-templates

to

  * https://devdiv.visualstudio.com/DevDiv/_git/Xamarin.yaml-templates

36.0.0-preview.5.116

Toggle 36.0.0-preview.5.116's commit message
[xabt] rename `$(EnableProfiler)` to `$(EnableDiagnostics)` (#10166)

Context: dotnet/macios#22982
Context: dotnet/runtime#115473 (comment)

We are aligning WASM, iOS, Android to all use the same property name for this.