From fe138f3498a5e23c1cc9290bf35c0549f937ff5a Mon Sep 17 00:00:00 2001 From: BDisp Date: Tue, 25 Jun 2024 00:50:13 +0100 Subject: [PATCH 1/2] Fixes #2598. Trying to run self-contained application on Ubuntu 22 (Linux-x64), error regarding libdl.so --- Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs index 40d51be4f..7d27b56ee 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs +++ b/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs @@ -256,7 +256,7 @@ namespace Unix.Terminal { /// to avoid the dependency on libc-dev Linux. /// static class CoreCLR { -#if NET7_0 +#if NET7_0 || NET8_0 // Custom resolver to support true single-file apps // (those which run directly from bundle; in-memory). // -1 on Unix means self-referencing binary (libcoreclr.so) From 8c3971c7fe3483db74aa95f6589984e47a9e9e55 Mon Sep 17 00:00:00 2001 From: BDisp Date: Tue, 25 Jun 2024 16:07:15 +0100 Subject: [PATCH 2/2] Add net6.0 target to the project. --- Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs | 2 +- Terminal.Gui/Terminal.Gui.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs index 7d27b56ee..48c375a6a 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs +++ b/Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs @@ -256,7 +256,7 @@ namespace Unix.Terminal { /// to avoid the dependency on libc-dev Linux. /// static class CoreCLR { -#if NET7_0 || NET8_0 +#if NET6_0_OR_GREATER // Custom resolver to support true single-file apps // (those which run directly from bundle; in-memory). // -1 on Unix means self-referencing binary (libcoreclr.so) diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index 9162889d1..bd919e2aa 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -20,7 +20,7 @@ portable - net472;netstandard2.0;netstandard2.1;net7.0;net8.0 + net472;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0 Terminal.Gui Terminal.Gui true