Merge pull request #1167 from dotnet/pakrym/notnull
Do not throw exception when DependencyModel does not exist
This commit is contained in:
commit
2b5c7d06fb
2 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue