Skip to content

Commit

Permalink
Merge branch 'release/0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Jul 28, 2020
2 parents c180d2f + 1ccec8b commit a0ce70a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Gazorator/Scripting/RazorContentGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ protected virtual IEnumerable<MetadataReference> GetMetadataReferences()

foreach (var reference in entryAssembly.GetReferencedAssemblies())
{
yield return MetadataReference.CreateFromFile(Assembly.Load(reference).Location);
var referencedAssembly = Assembly.Load(reference);
if (referencedAssembly.Location != null)
{
yield return MetadataReference.CreateFromFile(referencedAssembly.Location);
}
}
}

foreach (var reference in _references)
foreach (var reference in _references.Where(r => r.Location != null))
{
yield return MetadataReference.CreateFromFile(reference.Location);
}
Expand Down

0 comments on commit a0ce70a

Please sign in to comment.