Skip to content

Commit 4315921

Browse files
authored
Fix concurrency bug in AssemblyHelper (#407)
1 parent 8617393 commit 4315921

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xunit.runner.visualstudio/Utility/AssemblyResolution/AssemblyHelper_Desktop.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#if NETFRAMEWORK
22

33
using System;
4-
using System.Collections.Generic;
4+
using System.Collections.Concurrent;
55
using System.IO;
66
using System.Reflection;
77
using Xunit.Abstractions;
@@ -19,7 +19,7 @@ class AssemblyHelper : LongLivedMarshalByRefObject, IDisposable
1919

2020
readonly string directory;
2121
readonly IMessageSink? internalDiagnosticsMessageSink;
22-
readonly Dictionary<string, Assembly?> lookupCache = new();
22+
readonly ConcurrentDictionary<string, Assembly?> lookupCache = new();
2323

2424
/// <summary>
2525
/// Constructs an instance using the given <paramref name="directory"/> for resolution.

0 commit comments

Comments
 (0)