Skip to content

Commit

Permalink
Merge pull request #149 from ahmetsait/master
Browse files Browse the repository at this point in the history
Fix #148: Exception when `Scintilla.NET.dll` is loaded from memory
  • Loading branch information
desjarlais authored Jan 1, 2025
2 parents b133e15 + f6123a8 commit c0daa4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scintilla.NET/Scintilla.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<NeutralLanguage>en-US</NeutralLanguage>
<Description>Source Editing Component based on Scintilla 5 series.</Description>
<Copyright>Copyright (c) Jacob Slusser 2018, VPKSoft, cyber960 2022, desjarlais 2023.</Copyright>
<Version>5.6.3</Version>
<Version>5.6.5</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
6 changes: 4 additions & 2 deletions Scintilla.NET/Scintilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public static IEnumerable<string> EnumerateSatelliteLibrarySearchPaths()
{
// check run-time paths
string folder = Path.Combine("runtimes", Environment.Is64BitProcess ? "win-x64" : "win-x86", "native");
var runtimeAssembly = Assembly.GetExecutingAssembly();
string managedLocation = Path.GetDirectoryName(runtimeAssembly.Location) ?? AppDomain.CurrentDomain.BaseDirectory;
string location = Assembly.GetExecutingAssembly().Location;
if (string.IsNullOrWhiteSpace(location))
location = Assembly.GetEntryAssembly().Location;
string managedLocation = Path.GetDirectoryName(location) ?? AppDomain.CurrentDomain.BaseDirectory;
yield return Path.Combine(managedLocation, folder);

if (InDesignProcess())
Expand Down

0 comments on commit c0daa4e

Please sign in to comment.