diff --git a/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs b/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs index 46789b518c..24e62feb31 100644 --- a/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs +++ b/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs @@ -45,10 +45,11 @@ public void Handle(HostSignal signal, DiagnoserActionParameters parameters) switch (signal) { case HostSignal.BeforeAnythingElse: - if (tool is not null) - throw new InvalidOperationException("DotMemory tool is already initialized"); - tool = new DotMemoryTool(logger, nugetUrl, downloadTo: toolsDownloadFolder); - tool.Init(); + if (tool is null) + { + tool = new DotMemoryTool(logger, nugetUrl, downloadTo: toolsDownloadFolder); + tool.Init(); + } break; case HostSignal.BeforeActualRun: if (tool is null)