Revert "Load plugin into the default context if preferedSharedTypes"
This reverts commit 88038b8aab.
This commit is contained in:
parent
88038b8aab
commit
6de46986e4
@ -33,7 +33,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageVersion>1.4.5</PackageVersion>
|
||||
<PackageVersion>1.4.4</PackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildProjectDirectory)\releasenotes.props"
|
||||
|
||||
@ -178,12 +178,9 @@ namespace McMaster.NETCore.Plugins.Loader
|
||||
|
||||
public Assembly LoadAssemblyFromFilePath(string path)
|
||||
{
|
||||
var ctx = _preferDefaultLoadContext
|
||||
? _defaultLoadContext
|
||||
: this;
|
||||
if (!_loadInMemory)
|
||||
{
|
||||
return ctx.LoadFromAssemblyPath(path);
|
||||
return LoadFromAssemblyPath(path);
|
||||
}
|
||||
|
||||
using var file = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
@ -191,9 +188,9 @@ namespace McMaster.NETCore.Plugins.Loader
|
||||
if (File.Exists(pdbPath))
|
||||
{
|
||||
using var pdbFile = File.Open(pdbPath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
return ctx.LoadFromStream(file, pdbFile);
|
||||
return LoadFromStream(file, pdbFile);
|
||||
}
|
||||
return ctx.LoadFromStream(file);
|
||||
return LoadFromStream(file);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user