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() public IEnumerable<string> ResolveReferencePaths()
{ {
var entryAssembly = _entryAssembly.Value; var entryAssembly = _entryAssembly.Value;
var entryAssemblyName = entryAssembly.GetName().Name;
string basePath; string basePath;
string fullName; string fullName;

View file

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