dotnet / dotnet/BenchmarkDotNet
TypeLoadException is thrown when using third party exporter
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 1.1k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 11
Description
When using latest `master` branch code.
`BenchmarkDotNet.Samples` project throw following exception.
```
Unhandled exception. System.TypeLoadException: Method 'ExportAsync' in type 'VSDiagnosticsExporter' from assembly 'VSDiagnostics.BenchmarkDotNet, Version=18.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
at Microsoft.VSDiagnostics.VSDiagnosticsDiagnoser.get_Exporters()
at BenchmarkDotNet.Configs.ImmutableConfigBuilder.GetExporters(IEnumerable`1 exporters, ImmutableHashSet`1 uniqueDiagnosers, IList`1 configAnalyse) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Configs\ImmutableConfigBuilder.cs:line 129
at BenchmarkDotNet.Configs.ImmutableConfigBuilder.Create(IConfig source) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Configs\ImmutableConfigBuilder.cs:line 46
at BenchmarkDotNet.Running.BenchmarkConverter.GetFullTypeConfig(Type type, IConfig config) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkConverter.cs:line 98
at BenchmarkDotNet.Running.BenchmarkConverter.MethodsToBenchmarksWithFullConfig(Type type, MethodInfo[] benchmarkMethods, IConfig config) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkConverter.cs:line 44
at BenchmarkDotNet.Running.BenchmarkConverter.TypeToBenchmarks(Type type, IConfig config) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkConverter.cs:line 26
at BenchmarkDotNet.Running.TypeFilter.<>c__DisplayClass1_0.b__0(Type type) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\TypeFilter.cs:line 65
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
at BenchmarkDotNet.Running.TypeFilter.Filter(IConfig effectiveConfig, IEnumerable`1 types) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\TypeFilter.cs:line 64
at BenchmarkDotNet.Running.BenchmarkSwitcher.RunWithDirtyAssemblyResolveHelper(String[] args, IConfig config, Boolean askUserForInput, CancellationToken cancellationToken) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 162
at BenchmarkDotNet.Running.BenchmarkSwitcher.RunAsync(String[] args, IConfig config, CancellationToken cancellationToken) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 111
at BenchmarkDotNet.Engines.BenchmarkDotNetSynchronizationContext.ExecuteUntilComplete[T](ValueTask`1 valueTask) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Engines\BenchmarkSynchronizationContext.cs:line 101
at BenchmarkDotNet.Engines.BenchmarkSynchronizationContext.ExecuteUntilComplete[T](ValueTask`1 valueTask) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Engines\BenchmarkSynchronizationContext.cs:line 29
at BenchmarkDotNet.Running.BenchmarkSwitcher.Run(String[] args, IConfig config) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 73
at BenchmarkDotNet.Samples.Program.Main(String[] args) in C:\Projects\GitHub\thirdparty\BenchmarkDotNet\samples\BenchmarkDotNet.Samples\Program.cs:line 27
```
It seems be occurred because `IExporter` interface has breaking changes on recent commit.
Is it able to keep interface backward compatibility?
Otherwise, third party exporter dependency needs updated after BenchmarkDotNet `0.16.x` is released.
Contributor guide
Assessment
This issue has not been assessed yet.