From 9efc025197e5e8e82a9ccde28d408391fe9a7aad Mon Sep 17 00:00:00 2001 From: Brandon Desjarlais Date: Thu, 4 Dec 2025 09:19:23 -0600 Subject: [PATCH 1/3] - adding updated fix for #164 --- Scintilla.NET/Scintilla.NET.csproj | 2 +- Scintilla.NET/Scintilla.cs | 10 ++-------- Scintilla.NET/ScintillaNativeLibrary.cs | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 Scintilla.NET/ScintillaNativeLibrary.cs diff --git a/Scintilla.NET/Scintilla.NET.csproj b/Scintilla.NET/Scintilla.NET.csproj index 132e3e4..5fb50d2 100644 --- a/Scintilla.NET/Scintilla.NET.csproj +++ b/Scintilla.NET/Scintilla.NET.csproj @@ -5,7 +5,7 @@ en-US Source Editing Component based on Scintilla 5 series. Copyright (c) Jacob Slusser 2018, VPKSoft, cyber960 2022, desjarlais 2023, Ahmet Sait 2025 - 6.1.0 + 6.1.1 true True true diff --git a/Scintilla.NET/Scintilla.cs b/Scintilla.NET/Scintilla.cs index cce2499..1fdfe7c 100644 --- a/Scintilla.NET/Scintilla.cs +++ b/Scintilla.NET/Scintilla.cs @@ -77,9 +77,9 @@ procName is "devenv" or "DesignToolsServer" or // WinForms app in VS IDE public static IEnumerable EnumerateSatelliteLibrarySearchPaths() { // 1. User configured (must be set before first Scintilla usage) - if (!string.IsNullOrWhiteSpace(SatelliteDirectory)) + if (!string.IsNullOrWhiteSpace(ScintillaNativeLibrary.SatelliteDirectory)) { - yield return SatelliteDirectory; + yield return ScintillaNativeLibrary.SatelliteDirectory; } // 2. check run-time paths @@ -3577,12 +3577,6 @@ public void ClearChangeHistory() #region Properties - /// - /// Optional absolute directory path probed first for native satellite libraries. - /// If set, this directory is checked before all default probing locations. - /// - public static string SatelliteDirectory { get; set; } - /// /// Gets or sets whether Scintilla's native drag & drop should be used instead of WinForms based one. /// diff --git a/Scintilla.NET/ScintillaNativeLibrary.cs b/Scintilla.NET/ScintillaNativeLibrary.cs new file mode 100644 index 0000000..9a97983 --- /dev/null +++ b/Scintilla.NET/ScintillaNativeLibrary.cs @@ -0,0 +1,15 @@ +namespace ScintillaNET; + +/// +/// Provides optional early configuration for locating native satellite libraries (Scintilla.dll, Lexilla.dll). +/// Must be configured BEFORE the type is first touched; otherwise changes have no effect. +/// +public static class ScintillaNativeLibrary +{ + /// + /// Optional absolute directory path probed first for native satellite libraries. + /// If set, this directory is checked before all default probing locations. + /// Example Usage: ScintillaNativeLibrary.SatelliteDirectory = @"C:\MyApp\binaries"; + /// + public static string SatelliteDirectory { get; set; } +} From 2769c2c4b0b43ba89d4701097fac65c6e858df8b Mon Sep 17 00:00:00 2001 From: Brandon Desjarlais Date: Fri, 5 Dec 2025 10:26:55 -0600 Subject: [PATCH 2/3] Update Scintilla.NET/ScintillaNativeLibrary.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Scintilla.NET/ScintillaNativeLibrary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scintilla.NET/ScintillaNativeLibrary.cs b/Scintilla.NET/ScintillaNativeLibrary.cs index 9a97983..4cc9674 100644 --- a/Scintilla.NET/ScintillaNativeLibrary.cs +++ b/Scintilla.NET/ScintillaNativeLibrary.cs @@ -11,5 +11,5 @@ public static class ScintillaNativeLibrary /// If set, this directory is checked before all default probing locations. /// Example Usage: ScintillaNativeLibrary.SatelliteDirectory = @"C:\MyApp\binaries"; /// - public static string SatelliteDirectory { get; set; } + public static string? SatelliteDirectory { get; set; } } From 9efcd4a3ba211a92893bcdb589ef505c4da96a68 Mon Sep 17 00:00:00 2001 From: Brandon Desjarlais Date: Sat, 6 Dec 2025 23:25:04 -0600 Subject: [PATCH 3/3] - adding nullable enabled --- Scintilla.NET/ScintillaNativeLibrary.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scintilla.NET/ScintillaNativeLibrary.cs b/Scintilla.NET/ScintillaNativeLibrary.cs index 4cc9674..3070711 100644 --- a/Scintilla.NET/ScintillaNativeLibrary.cs +++ b/Scintilla.NET/ScintillaNativeLibrary.cs @@ -1,4 +1,5 @@ -namespace ScintillaNET; +#nullable enable +namespace ScintillaNET; /// /// Provides optional early configuration for locating native satellite libraries (Scintilla.dll, Lexilla.dll).