Merge branch 'release' into dev
This commit is contained in:
commit
c39efc88aa
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
|
||||||
|
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly IApplicationEnvironment _environment;
|
private readonly IApplicationEnvironment _environment;
|
||||||
private readonly IAssemblyLoaderEngine _loader;
|
private readonly IAssemblyLoadContext _loader;
|
||||||
|
|
||||||
private readonly Lazy<List<MetadataReference>> _applicationReferences;
|
private readonly Lazy<List<MetadataReference>> _applicationReferences;
|
||||||
|
|
||||||
|
|
@ -41,12 +41,12 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
|
||||||
/// <param name="libraryManager">The library manager that provides export and reference information.</param>
|
/// <param name="libraryManager">The library manager that provides export and reference information.</param>
|
||||||
/// <param name="host">The <see cref="IMvcRazorHost"/> that was used to generate the code.</param>
|
/// <param name="host">The <see cref="IMvcRazorHost"/> that was used to generate the code.</param>
|
||||||
public RoslynCompilationService(IApplicationEnvironment environment,
|
public RoslynCompilationService(IApplicationEnvironment environment,
|
||||||
IAssemblyLoaderEngine loaderEngine,
|
IAssemblyLoadContextAccessor loaderAccessor,
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
IMvcRazorHost host)
|
IMvcRazorHost host)
|
||||||
{
|
{
|
||||||
_environment = environment;
|
_environment = environment;
|
||||||
_loader = loaderEngine;
|
_loader = loaderAccessor.GetLoadContext(typeof(RoslynCompilationService).GetTypeInfo().Assembly);
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
_applicationReferences = new Lazy<List<MetadataReference>>(GetApplicationReferences);
|
_applicationReferences = new Lazy<List<MetadataReference>>(GetApplicationReferences);
|
||||||
_classPrefix = host.MainClassNamePrefix;
|
_classPrefix = host.MainClassNamePrefix;
|
||||||
|
|
@ -103,7 +103,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assembly = _loader.LoadStream(ms, pdbStream: null);
|
assembly = _loader.LoadStream(ms, assemblySymbols: null);
|
||||||
}
|
}
|
||||||
|
|
||||||
var type = assembly.GetExportedTypes()
|
var type = assembly.GetExportedTypes()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue