Browse Source

Fixes #2598. Run self-contained application on Linux. (#2600)

* Fixes #2598. Run self-contained application on Linux.

* Remove directive allowing always compile for single-file if PublishSingleFile is true.
BDisp 2 years ago
parent
commit
7ffd4b8ab4
1 changed files with 0 additions and 2 deletions
  1. 0 2
      Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs

+ 0 - 2
Terminal.Gui/ConsoleDrivers/CursesDriver/UnmanagedLibrary.cs

@@ -256,7 +256,6 @@ namespace Unix.Terminal {
 		/// to avoid the dependency on libc-dev Linux.
 		/// to avoid the dependency on libc-dev Linux.
 		/// </summary>
 		/// </summary>
 		static class CoreCLR {
 		static class CoreCLR {
-#if NET6_0
 			// Custom resolver to support true single-file apps
 			// Custom resolver to support true single-file apps
 			// (those which run directly from bundle; in-memory).
 			// (those which run directly from bundle; in-memory).
 			//	 -1 on Unix means self-referencing binary (libcoreclr.so)
 			//	 -1 on Unix means self-referencing binary (libcoreclr.so)
@@ -265,7 +264,6 @@ namespace Unix.Terminal {
 			static CoreCLR() =>  NativeLibrary.SetDllImportResolver(typeof(CoreCLR).Assembly,
 			static CoreCLR() =>  NativeLibrary.SetDllImportResolver(typeof(CoreCLR).Assembly,
 				(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) =>
 				(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) =>
 					libraryName == "libcoreclr.so" ? (IntPtr)(-1) : IntPtr.Zero);
 					libraryName == "libcoreclr.so" ? (IntPtr)(-1) : IntPtr.Zero);
-#endif
 
 
 			[DllImport ("libcoreclr.so")]
 			[DllImport ("libcoreclr.so")]
 			internal static extern IntPtr dlopen (string filename, int flags);
 			internal static extern IntPtr dlopen (string filename, int flags);