Description
I built this project with dotnet-11 (to see if it's fixed or not), it output singlefile and selfcontained binary, but I noticed that size is abnormally low size (11mb instead of supposed ~30mb).
Reproduction Steps
-
Clone this repo:
https://github.com/SteamRE/DepotDownloader.git
-
Then edit these files to override dotnet project version (important!):
DepotDownloader/DepotDownloader.csproj
global.json
-
Run this command to have exact same binary as me:
dotnet publish DepotDownloader/DepotDownloader.csproj --configuration Release -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:DebugType=embedded --self-contained --runtime linux-bionic-arm64 --output selfcontained-linux-bionic-arm64
-
Transfer selfcontained-linux-bionic-arm64/DepotDownloader file to Termux installed on your phone.
-
Execute this command:
./DepotDownloader
Bonus: After you dev teams fixed singlefile issue, binary won't run without some missing file located in /system/*/, please switch to $PREFIX/*/ instead (see more info at bottom of this page).
Expected behavior
To have bundled and working singlefile and selfcontained binary.
Actual behavior
Instead It have unbundled and non-working singlefile and selfcontained binary that output this:
You must install .NET to run this application.
App: /data/data/com.termux/files/home/DepotDownloader
Architecture: arm64
App host version: 11.0.0-preview.5.26302.115
.NET location: Not found
The following locations were searched:
Application directory:
/data/data/com.termux/files/home/
Environment variable:
DOTNET_ROOT_ARM64 = <not set>
DOTNET_ROOT = <not set>
Registered location:
/etc/dotnet/install_location_arm64 = <not set>
Default location:
/usr/share/dotnet
Learn more:
https://aka.ms/dotnet/app-launch-failed
Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=linux-bionic-arm64&os=linux-bionic&apphost_version=11.0.0-preview.5.26302.115
Regression?
Nope, it's same on dotnet-9, 10 and now 11-preview. (dotnet-8 doesn't have singlefile support for linux-bionic-arm64)
Known Workarounds
Don't build singlefile and selfcontained binaries, instead build normal selfcontained binaries without singlefile. (Currently broken for dotnet-9 and dotnet-10, build using Termux and its dotnet* packages instead)
Configuration
-
The DepotDownloader repo is written for dotnet-9, latest SteamKit (library used by DD) repo is written for dotnet-10. I forced it to be built with dotnet-11 (to see if singlefile and selfcontained bug is fixed.)
-
linux-bionic-arm64 aka Termux on Android.
-
arm64, built binary with my x64 PC, tested binary with my arm64 phone.
-
Huh?
Other information
By the way, please don't look for libssl in /system/lib*/, instead look for Termux's $PREFIX/lib/. I used $PREFIX because you can build your Termux with different data path which rendered compatibility issues for dotnet-built binaries that look for absolute path of Termux such as /data/data/com.termux/files/usr.
Also please take a look into this awesome Termux package and their patches :)
https://github.com/termux/termux-packages/tree/d80e46464959131c9301dae48f5e6b78f96a8be3/packages/dotnet10.0
Description
I built this project with dotnet-11 (to see if it's fixed or not), it output singlefile and selfcontained binary, but I noticed that size is abnormally low size (11mb instead of supposed ~30mb).
Reproduction Steps
Clone this repo:
https://github.com/SteamRE/DepotDownloader.git
Then edit these files to override dotnet project version (important!):
DepotDownloader/DepotDownloader.csproj
global.json
Run this command to have exact same binary as me:
dotnet publish DepotDownloader/DepotDownloader.csproj --configuration Release -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:DebugType=embedded --self-contained --runtime linux-bionic-arm64 --output selfcontained-linux-bionic-arm64Transfer selfcontained-linux-bionic-arm64/DepotDownloader file to Termux installed on your phone.
Execute this command:
./DepotDownloaderBonus: After you dev teams fixed singlefile issue, binary won't run without some missing file located in
/system/*/, please switch to$PREFIX/*/instead (see more info at bottom of this page).Expected behavior
To have bundled and working singlefile and selfcontained binary.
Actual behavior
Instead It have unbundled and non-working singlefile and selfcontained binary that output this:
Regression?
Nope, it's same on dotnet-9, 10 and now 11-preview. (dotnet-8 doesn't have singlefile support for
linux-bionic-arm64)Known Workarounds
Don't build singlefile and selfcontained binaries, instead build normal selfcontained binaries without singlefile. (Currently broken for dotnet-9 and dotnet-10, build using Termux and its dotnet* packages instead)
Configuration
The DepotDownloader repo is written for dotnet-9, latest SteamKit (library used by DD) repo is written for dotnet-10. I forced it to be built with dotnet-11 (to see if singlefile and selfcontained bug is fixed.)
linux-bionic-arm64aka Termux on Android.arm64, built binary with my x64 PC, tested binary with my arm64 phone.
Huh?
Other information
By the way, please don't look for libssl in
/system/lib*/, instead look for Termux's$PREFIX/lib/. I used$PREFIXbecause you can build your Termux with different data path which rendered compatibility issues for dotnet-built binaries that look for absolute path of Termux such as/data/data/com.termux/files/usr.Also please take a look into this awesome Termux package and their patches :)
https://github.com/termux/termux-packages/tree/d80e46464959131c9301dae48f5e6b78f96a8be3/packages/dotnet10.0