Skip to content

Commit

Permalink
Use runtime identifier instead of OS architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Sep 21, 2024
1 parent 61e7c58 commit c85168e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ static PlatformInformation()
NativeLibraryPrefixes = new[] { string.Empty };
NativeLibraryExtensions = new[] { ".dll" };

// For now we only care about windows
runtimeIdentifiers.Add($"win-{RuntimeInformation.OSArchitecture.ToString().ToLower()}");
var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;
var osArchitecture = RuntimeInformation.OSArchitecture.ToString();

Log.Debug($"OS Architecture: {osArchitecture}");
Log.Debug($"Runtime identifier: {runtimeIdentifier}");

// Note that we need to respect the process, not the OS
runtimeIdentifiers.Add(runtimeIdentifier);
//runtimeIdentifiers.Add($"win-{osArchitecture.ToLower()}");
runtimeIdentifiers.Add("win");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Expand All @@ -55,4 +62,4 @@ static PlatformInformation()

RuntimeIdentifiers = runtimeIdentifiers.ToArray();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public RuntimeAssemblyResolverService(IFileService fileService, IDirectoryServic
_directoryService = directoryService;
_assemblyReflectionService = assemblyReflectionService;
_appDataService = appDataService;

Log.Debug($"Platform identifiers: {PlatformInformation.RuntimeIdentifiers}");
Log.Debug($"Runtime identifier: {RuntimeInformation.RuntimeIdentifier}");
}

public IPluginLoadContext[] GetPluginLoadContexts()
Expand Down

0 comments on commit c85168e

Please sign in to comment.