Skip to content

Could not load file or assembly using dotnet benchmark #1371

Closed
@olivegamestudio

Description

@olivegamestudio

When running the following command line:

dotnet benchmark XXX.dll

The DLL project is referencing, but tried different versions to no avail:

<PackageReference Include="BenchmarkDotNet" Version="0.12.0" />

I get the following error:

Couldn't load the assembly XXX.dll.
System.IO.FileLoadException: Could not load file or assembly 'XXX, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at BenchmarkDotNet.Tool.AssemblyResolver..ctor(String path) in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\AssemblyResolver.cs:line 21
at BenchmarkDotNet.Tool.Program.OnExecute() in W:\Work\BenchmarkDotNet\src\BenchmarkDotNet.Tool\Program.cs:line 44

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