Do not throw exception when DependencyModel does not exist

This commit is contained in:
Pavel Krymets 2016-02-01 12:13:48 -08:00
parent 0951d424be
commit a6bfc67e8a
2 changed files with 1 additions and 2 deletions

View file

@ -28,7 +28,6 @@ namespace Microsoft.Extensions.DependencyModel
public IEnumerable<string> ResolveReferencePaths()
{
var entryAssembly = _entryAssembly.Value;
var entryAssemblyName = entryAssembly.GetName().Name;
string basePath;
string fullName;

View file

@ -42,7 +42,7 @@ namespace Microsoft.Extensions.DependencyModel
if (stream == null)
{
throw new InvalidOperationException("Entry assembly was compiled without `preserveCompilationContext` enabled");
return null;
}
using (stream)