Description
Steps:
- Created an empty 4.6.1 VB project in VS 2019.
- Added nuget package for BenchmarkDotNet.
- Build.
- From prompt, run "dotnet benchmark ClassLibrary2.dll"
- Get the following exceptions:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load type 'Microsoft.VisualBasic.ApplicationServices.ApplicationBase' from assembly 'Microsoft.VisualBasic, Version=10.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Could not load type 'Microsoft.VisualBasic.Devices.Computer' from assembly 'Microsoft.VisualBasic, Version=10.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at BenchmarkDotNet.Extensions.ReflectionExtensions.GetRunnableBenchmarks(Assembly assembly) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Extensions\ReflectionExtensions.cs:line 131
at BenchmarkDotNet.Running.TypeFilter.GetTypesWithRunnableBenchmarks(IEnumerable1 types, IEnumerable
1 assemblies, ILogger logger) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\TypeFilter.cs:line 34
at BenchmarkDotNet.Running.BenchmarkSwitcher.RunWithDirtyAssemblyResolveHelper(String[] args, IConfig config) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 92
at BenchmarkDotNet.Running.BenchmarkSwitcher.Run(String[] args, IConfig config) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 67
at BenchmarkDotNet.Tool.Program.OnExecute() in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\Program.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(MethodInfo method, Object instance, Object[] arguments)
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context)
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass138_0.b__0()
at BenchmarkDotNet.Tool.Program.Main(String[] args) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\Program.cs:line 26