Remove use of AssemblyLoadContext

This will be needed for the switch back to net46.
This commit is contained in:
Ryan Nowak 2017-05-23 19:39:36 -07:00
parent a6d97d35e3
commit 6094c6ff52
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Compilation
{
try
{
AssemblyLoadContext.Default.LoadFromAssemblyPath(precompiledAssemblyFilePath);
Assembly.LoadFile(precompiledAssemblyFilePath);
}
catch (FileLoadException)
{

View File

@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
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;
}