Skip to content

dotnet benchmark Tool Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel #1355

Closed
@7enderhead

Description

@7enderhead
  • Windows 10
  • dotnet core 3.0.100
  • F# project from exercism (binary search tree), relevant files attached in archive
  • running dotnet benchmark gives the appended following stack trace message (regardless of whether selecting benchmark manually or using --filter)
[...]\binary-search-tree>dotnet benchmark bin\Debug\netcoreapp3.0\BinarySearchTree.dll
Available Benchmark:
  #0 TreeBenchmarks


You should select the target benchmark(s). Please, print a number of a benchmark (e.g. `0`) or a contained benchmark caption (e.g. `TreeBenchmarks`).
If you want to select few, please separate them with space ` ` (e.g. `1 2 3`).
You can also provide the class name in console arguments by using --filter. (e.g. `--filter *TreeBenchmarks*`).
0

// Validating benchmarks:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at BenchmarkDotNet.Validators.JitOptimizationsValidator.Validate(ValidationParameters validationParameters)+MoveNext() in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Validators\JitOptimizationsValidator.cs:line 24
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.DistinctIterator`1.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Validate(BenchmarkRunInfo[] benchmarks, ILogger logger) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkRunnerClean.cs:line 252
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo[] benchmarkRunInfos) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkRunnerClean.cs:line 52
   at BenchmarkDotNet.Running.BenchmarkSwitcher.RunWithDirtyAssemblyResolveHelper(String[] args, IConfig config) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 109
   at BenchmarkDotNet.Running.BenchmarkSwitcher.Run(String[] args, IConfig config) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet\Running\BenchmarkSwitcher.cs:line 62
   at BenchmarkDotNet.Tool.Program.OnExecute() in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\Program.cs:line 47
--- 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.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass138_0.<OnExecute>b__0()
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at BenchmarkDotNet.Tool.Program.Main(String[] args) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\Program.cs:line 27

binary-search-tree.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions