Download presentation
Presentation is loading. Please wait.
1
Portable .NET Core on Linux
Jan Vorlicek Microsoft
2
.NET Core on different Linux distros
CoreCLR / CoreFX use several native platform libraries (standard C/C++ libraries, CURL, ICU, SSL, …) Managed code calls to those via thin PAL layer Their SO names and supported APIs can differ per Linux distro or even distro versions Native parts of CoreCLR / CoreFX built on one distro don‘t necessarily work on others Targeting Linux if .NET Core native components are built as distro dependent complicates building .NET Core apps
3
Making .NET Core on Linux portable
Fixing issues with standard C/C++ libraries - build native components on the oldest supported distro. Fixing issues with ICU / SSL / CURL Shims to load the 3rd party libraries and resolve their symbols. ICU – handle different SO name for each ICU version (libicuuc.so.52.1, libicuuc.so.53.1, …). On most distros, the symbol names contain version number too (u_strlen_52, u_strlen_52_1). SSL – handle different SO name on Fedora based distros (libssl.so.10) and different one on the others (libssl.so.1.0.0). Debian 9 started to use libssl.so SSL - optional usage of some elliptic curves cryptography functions. CURL – dynamic detection and optional handling of HTTP 2.0 request multiplexing.
4
Enabling standalone portable .NET Core apps
Using the RPATH in the host executable (apphost) Set to $ORIGIN/netcoredeps Developers can create that subfolder next to the main executable and store copies all native dependencies they want in there Linux loader looks into this folder when loading dependencies before looking into standard locations It works transitively (for dependencies of these dependencies etc.)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.