Skip to content

Commit

Permalink
Match TLBs to assemblies according to their full file name, case inse…
Browse files Browse the repository at this point in the history
…nsitive (#329)

Co-authored-by: Manuel Leßmann <[email protected]>
  • Loading branch information
mlessmann and mlessmann authored Jan 8, 2025
1 parent 2aab903 commit a4d909d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dscom/TypeInfoResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ public TypeInfoResolver(WriterContext writerContext)
if (typeLib == null)
{
var name = assembly.GetName().Name ?? string.Empty;
var additionalLibsWithMatchingName = _additionalLibs.Where(additionalLib => additionalLib.Contains(name));
var additionalLibsWithMatchingName = _additionalLibs
.Where(additionalLib => Path.GetFileNameWithoutExtension(additionalLib).Equals(name, StringComparison.OrdinalIgnoreCase));

// At first we try to find a type library that matches the assembly name.
// We do this to limit the number of type libraries to load.
// See https://github.com/dspace-group/dscom/issues/310
foreach (var additionalLib in additionalLibsWithMatchingName)
{
AddTypeLib(additionalLib);
Expand Down

0 comments on commit a4d909d

Please sign in to comment.