Skip to content

Commit fc19b6d

Browse files
committed
fix(nunit): use object locks so MTP compiles on net8
System.Threading.Lock is net9+; Polyfill covers net48 but not net8.0-windows, which blocked Revit 2025 sample runs.
1 parent 1168a8e commit fc19b6d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

source/DevTools.NUnit.Core/Client/ProcessRunnerClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal sealed class ProcessRunnerClient : IRunnerTransport, IDisposable
1919

2020
private readonly string _runnerPath;
2121
private Process? _activeProcess;
22-
private readonly Lock _processLock = new();
22+
private readonly object _processLock = new();
2323

2424
internal ProcessRunnerClient(string runnerPath)
2525
{

source/DevTools.NUnit.TestAdapter/DevToolsNUnitExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace DevTools.NUnit.TestAdapter;
1212
public sealed class DevToolsNUnitExecutor : ITestExecutor
1313
{
1414
private ProcessRunnerClient? _client;
15-
private readonly Lock _clientLock = new();
15+
private readonly object _clientLock = new();
1616

1717
public void RunTests(IEnumerable<TestCase>? tests, IRunContext? runContext, IFrameworkHandle? frameworkHandle)
1818
{

0 commit comments

Comments
 (0)