Skip to content

Commit

Permalink
Take last runtime if there are several
Browse files Browse the repository at this point in the history
  • Loading branch information
zabbius committed Jan 27, 2023
1 parent 5d39ab2 commit fd23471
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Refasmer/Importer/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ private AssemblyReferenceHandle FindRuntimeReference()
foreach (var runtimeName in RuntimeNames)
{
var runtimeRef = _reader.AssemblyReferences
.SingleOrDefault(r => _reader.GetString(_reader.GetAssemblyReference(r).Name) == runtimeName);
.Where(r => _reader.GetString(_reader.GetAssemblyReference(r).Name) == runtimeName)
.OrderByDescending(r => _reader.GetAssemblyReference(r).Version)
.FirstOrDefault();

if (!IsNil(runtimeRef))
return runtimeRef;
Expand Down

0 comments on commit fd23471

Please sign in to comment.