mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Change ExtensionServiceProvider to use a single AssemblyLoadContext (#696)
* Switch to the unified SMO NuGet so all binaries are strong named and signed. * use one AssemblyLoader instance for all loads * Revert "use one AssemblyLoader instance for all loads" This reverts commit 48c59ffd5c57152de281c87acdbcad7ddf7ab760. * Stop creating multiple AssemblyLoadContext objects during composition, per https://github.com/dotnet/coreclr/issues/19632 * restore high entropyva property * Improve the comment
This commit is contained in:
@@ -230,8 +230,11 @@ namespace Microsoft.SqlTools.Extensibility
|
||||
var apiApplicationFileInfo = new FileInfo($"{folderPath}{Path.DirectorySeparatorChar}{assemblyName.Name}.dll");
|
||||
if (File.Exists(apiApplicationFileInfo.FullName))
|
||||
{
|
||||
var asl = new AssemblyLoader(apiApplicationFileInfo.DirectoryName);
|
||||
return asl.LoadFromAssemblyPath(apiApplicationFileInfo.FullName);
|
||||
// Creating a new AssemblyContext instance for the same folder puts us at risk
|
||||
// of loading the same DLL in multiple contexts, which leads to some unpredictable
|
||||
// behavior in the loader. See https://github.com/dotnet/coreclr/issues/19632
|
||||
|
||||
return LoadFromAssemblyPath(apiApplicationFileInfo.FullName);
|
||||
}
|
||||
}
|
||||
return Assembly.Load(assemblyName);
|
||||
|
||||
Reference in New Issue
Block a user