mobileWarnings for .NET on Android

Here are some of the warnings you'll need to consider when building or running .NET projects on Android

When you're trying to build or run .NET projects on Android, you'll need to consider the following warnings:

chevron-rightFailed to create CoreCLR, HRESULT: 0x8007000Ehashtag

Trying to run or build any .NET application on an ARM64 Android device (e.g. Android devices with Qualcomm Snapdragon 8 Gen 2 as SoC) with Termux emits the following error message:

$ dotnet build
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E

In order to fix this message, append the below environment variable before each dotnet build command like this:

$ DOTNET_GCHeapHardLimit=1C0000000 dotnet build
chevron-righterror MSB6006: "csc.dll" exited with code 139.hashtag
circle-info

Usually, updated .NET versions no longer face this problem. However, in case you're still suffering from the below error messages, follow these steps.

Trying to run or build any .NET application on an ARM64 Android device (e.g. Android devices with Qualcomm Snapdragon 8 Gen 2 as SoC) with Termux emits the following error message:

$ DOTNET_GCHeapHardLimit=1C0000000 dotnet build
(...)
error MSB6006: "csc.dll" exited with code 139.
Build FAILED.

In order to fix this message, either update proot to its latest version, or download the fixed version of proot using this linkarrow-up-right (mirror if downarrow-up-right) and run these commands outside the Ubuntu proot-distro environment:

# dpkg -i proot_5.1.107-50_aarch64.deb
# apt-mark hold proot

Last updated