Skip to content

Commit

Permalink
Improve dbgshim.dll locator (fixes #276)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElektroKill committed Dec 19, 2023
1 parent 836b371 commit 8e245f6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public static string GetDebugShimFilename(int bitness) {
default: throw new ArgumentOutOfRangeException(nameof(bitness));
}
#elif NET
string path = Path.Combine(basePath, filename);
// If dnSpy is published, the file will be located in the app directory
if (File.Exists(path))
return path;
// If dnSpy is ran from source, the file will be located in a different directory
return Path.Combine(basePath, "runtimes", RuntimeInformation.RuntimeIdentifier, "native", filename);
#else
#error Unknown target framework
Expand Down

0 comments on commit 8e245f6

Please sign in to comment.