Installing .NET 10.0 on Ubuntu proot-distro with Termux on Android
.NET 10.0 is a new version of the modern .NET framework that brings several improvements across different areas of the software development kit, including runtime improvements (JIT inlining improvements, method devirtualization, and so on), new APIs in .NET libraries (new JSON deserialization options, post-quantum cryptography support, and so on), and many more improvements.
Normally, any .NET applications that are built for a specific platform can be run normally, such as Android applications made with MAUI. However, what if you’ve planned to run a CLI .NET application on Android? Or an application for computers? Termux can provide you with a solution.
Recent improvements to Termux involved changing how proot-distro downloads the distribution containers so that it utilizes Docker Hub to download the necessary assets and configure them to be usable. Follow the below steps to install .NET 10.0 with Ubuntu proot-distro.
- For Samsung devices, you might want to turn off the Auto Blocker feature so that you can install it. You can also use the Play Store version, but we haven’t tested it yet, and your mileage may vary.
pkg upgrade.
- If you’re prompted to choose whether to keep your own changes or to install the package-supplied version, just press ENTER on your phone’s keyboard.
pkg install proot-distro.proot-distro install ubuntu:26.04.
- It might take a while, depending on your internet connection.
proot-distro login ubuntu.apt update.
- If there are any, run
apt dist-upgradeto upgrade all packages.
- If you want to build .NET applications, install the SDK using
apt install dotnet-sdk-10.0. - If you want to just run .NET applications, install the runtime using
apt install dotnet-runtime-10.0.
- Create a new directory, such as test (
mkdir test), and change the current directory to it (cd test) - Create a new .NET console project with
dotnet new console --use-program-main. - Verify that it actually builds using
dotnet run.
However, as of now, you may be running into an issue where the building stage of any application may fail with error messages that are similar to this:
GC heap initialization failed with error 0x8007000E Failed to create CoreCLR, HRESULT: 0x8007000E In this case, you’ll have to add an environment variable that changes the GC heap hard limit value to an acceptable value so that you can build and run applications on Android devices. In order to do this temporarily, append the environment variable before the command, such as this:
$ DOTNET_GCHeapHardLimit=1C0000000 dotnet build If this works, you can add a line that exports this environment variable to your ~/.profile like this:
$ echo "DOTNET_GCHeapHardLimit=1C0000000" >> ~/.profile $ . ~/.profile Once done, exit and re-enter your proot environment, and you should be able to build and run .NET applications.
#NET #2604 #2604LTS #Android #C #csharp #dotnet #news #oneUi #Proot #ProotDistro #Samsung #smartphone #Tech #Technology #Termux #Ubuntu #Ubuntu2604 #Ubuntu2604LTS #Ubuntu2604LTSResolute #Ubuntu2604LTSResoluteRaccoon #Ubuntu2604Resolute #Ubuntu2604ResoluteRaccoon #ubuntuProot #update