BenchmarkDotNet
BenchmarkDotNet copied to clipboard
Metadata file could not be found when dependency project has different output directory
Hi!
I'm running BenchmarkDotNet with the following setup:
-
Core.csproj: a library project with code that should be benchmarked -
Benchmarks.csproj: a project that referencesCore.csprojand contains benchmarks
However, there are some unusual details that probably cause the problem:
-
Core.csprojhas unusual build configs (notDebugorRelease) and thus has unusual output directories -
Benchmarks.csprojhas standard build configs
When running Benchmarks.csproj, I get the following error:
error CS0006: Metadata file '...\bin\Release\Core.dll' could not be found [...\Benchmarks\bin\Release\net5.0\3ddcef73-2d0d-49c9-863f-b01de63a8ec3\BenchmarkDotNet.Autogenerated.csproj]
Seems like BenchmarkDotNet looks in the bin\Release for Core.dll, however, it is stored in bin\Different Release\Core.dll.
Is this a known issue or something that can be fixed? Thanks!
I have a similar issue with the same project structure.
Benchmark.net tries to find the main project assembly under ProjectFolder\bin\x86\Release but my project compiles under ProjectFolder\bin\Release