Home
Options

"Method does not have an implementation" when using BenchmarkDotNet

When attempting to use the BenchmarkDotNet NuGet package, any calls to the library result in an exception.
Exception: System.MissingMethodException: Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, Boolean, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1, Microsoft.CodeAnalysis.OptimizationLevel, Boolean, Boolean, System.String, System.String, System.Collections.Immutable.ImmutableArray`1, System.Nullable`1, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32, System.Collections.Generic.IEnumerable`1>, Boolean, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider, Boolean)'.
By manually installing the Microsoft.CodeAnalysis.CSharp NuGet package I can get around this error. I've reported this to BenchmarkDotNet (https://github.com/dotnet/BenchmarkDotNet/issues/445) but it's been indicated that this may be an issue with LinqPad instead. Not sure if there's anything we can do about this since it may just be dependency conflicts.

Comments

Sign In or Register to comment.