Skip to content

Commit 307753a

Browse files
shimingsgCopilot
andauthored
Fix the issue that the test exits with cannot find Microsoft.Win32.Primitives.dll (#117699)
* fix the issue that the test exits with cannot find Microsoft.Win32.Primitives.dll * Update src/tests/GC/Stress/Framework/ReliabilityFramework.cs Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 9df2042 commit 307753a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tests/GC/Stress/Framework/ReliabilityFramework.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public CustomAssemblyResolver()
5151
protected override Assembly Load(AssemblyName assemblyName)
5252
{
5353
string strPath;
54-
if (assemblyName.Name.StartsWith("System."))
54+
if (assemblyName.Name.StartsWith("System.", StringComparison.Ordinal) || assemblyName.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
5555
{
56+
// If the assembly is a framework assembly, we load it from the framework path.
5657
strPath = Path.Combine(_frameworkPath, assemblyName.Name + ".dll");
5758
}
5859
else

0 commit comments

Comments
 (0)