File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/BenchmarkDotNet/Diagnosers Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ private static IDiagnoser[] LoadWindowsDiagnosers()
80
80
CreateDiagnoser ( diagnosticsAssembly , "BenchmarkDotNet.Diagnostics.Windows.NativeMemoryProfiler" )
81
81
} ;
82
82
}
83
+ catch ( Exception ex ) when ( ex is FileNotFoundException || ex is BadImageFormatException )
84
+ {
85
+ // Return an array of UnresolvedDiagnoser objects when the assembly does not contain the requested diagnoser
86
+ return new [ ] { GetUnresolvedDiagnoser < IDiagnoser > ( ) } ;
87
+ }
83
88
catch ( Exception ex ) // we're loading a plug-in, better to be safe rather than sorry
84
89
{
85
90
ConsoleLogger . Default . WriteLineError ( $ "Error loading { WindowsDiagnosticAssemblyFileName } : { ex . GetType ( ) . Name } - { ex . Message } ") ;
You can’t perform that action at this time.
0 commit comments