Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark runs failing when using .NET 5 RC2 SDK installed via snap #1570

Closed
eiriktsarpalis opened this issue Oct 23, 2020 · 2 comments · Fixed by #1652
Closed

Benchmark runs failing when using .NET 5 RC2 SDK installed via snap #1570

eiriktsarpalis opened this issue Oct 23, 2020 · 2 comments · Fixed by #1652
Assignees
Milestone

Comments

@eiriktsarpalis
Copy link
Member

I tried installing .NET 5 RC2 sdk on Ubuntu 20.04 following the instructions listed here.

When trying to run net5.0 benchmarks using that SDK I'm getting the following failure:

BenchmarkDotNet requires dotnet cli to be installed or path to local dotnet cli provided in explicit way using `--cli` argument, benchmark 'HeapSortBenchmarks.PriorityQueue: DefaultJob [Size=30]' will not be executed

I suspect the issue is due to the fact that the snap installation of the sdk relies on symlinks:

$ ls -l `which dotnet`
lrwxrwxrwx 1 root root 17 Oct 23 13:33 /snap/bin/dotnet -> dotnet-sdk.dotnet

When I try to run the benchmarks using

$ dotnet run -c Release --cli dotnet

I'm getting a similar error:

The provided CliPath "dotnet" does NOT exist.

However if I pass the underlying file:

$ dotnet run -c Release --cli /snap/bin/dotnet-sdk.dotnet

The benchmark executes without issue.

The relevant code doing the detection is here. It is not clear to me whether it is an issue with the heuristic or a System.Diagnostics.Process bug related to symlinks. cc @adamsitnik

@rahulpandey1
Copy link

@eiriktsarpalis still facing same issue
removed .net 5 even same issue
image

@adamsitnik
Copy link
Member

@rahulpandey1 which BDN version are you using? what if you use dotnet run -c Release instead of dotnet $pathToDll?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants