Skip to content

Commit

Permalink
Merge branch 'release/0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Jul 27, 2020
2 parents 637eeba + a0f540d commit c180d2f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Gazorator/Scripting/RazorContentGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ protected virtual IEnumerable<MetadataReference> GetMetadataReferences()
yield return MetadataReference.CreateFromFile(typeof(System.Data.DataTable).Assembly.Location); // System.Data

var entryAssembly = Assembly.GetEntryAssembly();
yield return MetadataReference.CreateFromFile(entryAssembly.Location);

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

foreach (var reference in entryAssembly.GetReferencedAssemblies())
{
yield return MetadataReference.CreateFromFile(Assembly.Load(reference).Location);
}
}

foreach (var reference in _references)
Expand Down

0 comments on commit c180d2f

Please sign in to comment.