Skip to content

Commit

Permalink
match assembly simple name before loading (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlal authored Jul 20, 2024
1 parent 5d80bea commit 53a9cbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Test/SystematicTesting/TestMethodInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Runtime.Loader;
#endif
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.Coyote.Actors;
using Microsoft.Coyote.Logging;
using Microsoft.Coyote.Runtime;
Expand Down Expand Up @@ -444,9 +445,9 @@ private Assembly OnResolving(AssemblyLoadContext context, AssemblyName assemblyN
runtimeLibrary.Dependencies,
runtimeLibrary.Serviceable);
if (this.AssemblyResolver.TryResolveAssemblyPaths(compilationLibrary, assemblies) &&
assemblies.Count > 0)
assemblies.Any(a => string.Equals(Path.GetFileNameWithoutExtension(a), assemblyName.Name, StringComparison.OrdinalIgnoreCase)))
{
return this.LoadContext.LoadFromAssemblyPath(assemblies[0]);
return this.LoadContext.LoadFromAssemblyPath(assemblies.First(a => string.Equals(Path.GetFileNameWithoutExtension(a), assemblyName.Name, StringComparison.OrdinalIgnoreCase)));
}
else
{
Expand Down

0 comments on commit 53a9cbc

Please sign in to comment.