petabridge / NBench

Performance benchmarking and testing framework for .NET applications :chart_with_upwards_trend:
https://nbench.io/
Apache License 2.0
532 stars 46 forks source link

dotnet exec needs a managed .dll or .exe extension #267

Closed IgorFedchenko closed 4 years ago

IgorFedchenko commented 4 years ago

I have tried to use NBench for some performance tests, and it seems very convenient and intuitive.

But after creating sample project, I was getting the following output:

dotnet nbench
Building for framework netcoreapp2.1...
  Akka -> C:\Projects\Akka.net\src\core\Akka\bin\Release\netstandard2.0\Akka.dll
  Akka.IO.Benchmarks -> C:\Projects\Akka.net\src\benchmark\Akka.IO.Benchmarks\bin\Release\netcoreapp2.1\Akka.IO.Benchmarks.dll
Running .NET Core  tests for framework netcoreapp2.1...
OutputDir C:\Projects\Akka.net\src\benchmark\Akka.IO.Benchmarks\PerfResults
dotnet exec needs a managed .dll or .exe extension. The application specified was 'C:\Projects\Akka.net\src\benchmark\Akka.IO.Benchmarks\bin\Release\netcoreapp2.1\Akka.IO.Benchmarks.deps.json'

So I was stuck here - what does dotnet exec needs a managed .dll or .exe extension mean? Seems like this deps.json file is passed as a executable file path somewhere?

Aaronontheweb commented 4 years ago

Resolved in 2.0 - all tests going forward will be executed inside their own Program.cs. No more external test runner or creative MSBuild hacks like how we had in the dotnet nbench tool.