Remove use of AssemblyLoadContext
This will be needed for the switch back to net46.
This commit is contained in:
parent
a6d97d35e3
commit
6094c6ff52
|
|
@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Compilation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AssemblyLoadContext.Default.LoadFromAssemblyPath(precompiledAssemblyFilePath);
|
Assembly.LoadFile(precompiledAssemblyFilePath);
|
||||||
}
|
}
|
||||||
catch (FileLoadException)
|
catch (FileLoadException)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
|
||||||
|
|
||||||
public static Assembly LoadAssembly(MemoryStream assemblyStream, MemoryStream pdbStream)
|
public static Assembly LoadAssembly(MemoryStream assemblyStream, MemoryStream pdbStream)
|
||||||
{
|
{
|
||||||
var assembly = AssemblyLoadContext.Default.LoadFromStream(assemblyStream, pdbStream);
|
var assembly = Assembly.Load(assemblyStream.ToArray(), pdbStream.ToArray());
|
||||||
return assembly;
|
return assembly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue