Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

.NET MeetUp Prague 2017 - Portable .NET Core on Linux -- Jan Vorlicek


Published on

.NET MeetUp Prague, CZ - 2017/7/19
Talk: Portable .NET Core on Linux by Jan Vorlicek

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

.NET MeetUp Prague 2017 - Portable .NET Core on Linux -- Jan Vorlicek

  1. 1. Portable .NET Core on Linux Jan Vorlicek Microsoft
  2. 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. 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 (,, …). 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 ( and different one on the others ( Debian 9 started to use • SSL - optional usage of some elliptic curves cryptography functions. • CURL – dynamic detection and optional handling of HTTP 2.0 request multiplexing.
  4. 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.)