This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
CandidateAssemblies should always include the entry assembly? #4318
Closed
Description
Scenario, I'm running MVC Sandbox and I get a 404 on startup.
Default assembly manager does this:
https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/Infrastructure/DefaultAssemblyProvider.cs#L75
public IEnumerable<Assembly> CandidateAssemblies
{
get
{
if (_dependencyContext == null)
{
// Use the entry assembly as the sole candidate.
return new[] { _entryAssembly };
}
return GetCandidateLibraries()
.SelectMany(l => l.Assemblies)
.Select(Load);
}
}
GetCandidateLibraries only includes dependent assemblies (which for MVCSandbox only contains the MVC assemblies)
I believe the list of candidate assemblies should always contain the entry assembly plus optionally a set of referenced assemblies based on whether or not the DependencyContext is available.