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
Results are not saved to file when running via command line #2448
Comments
I suspect that the current directory is different and the files get created in a different folder. Could you please see if it's true? |
Hi @adamsitnik, I searched the entire directory structured but the folder is unfortunately not showing up anywhere. I will try and share the project soon so you can see for yourself. |
Hi @adamsitnik, it seems that running the project from the console has the effect of the results path being much, much further up. I have now located it in the root directory of my hard drive, which is 7 levels further up than when running it from VS... Any idea why that might be? |
I also just noticed that adding |
VS must be setting a different working directory. You can check it by adding following code to your console app: System.Console.WriteLine(System.Environment.CurrentDirectory);
Are you providing a correct filter that matches some benchmarks? |
I did do that, and while I can't remember the exact result now, it was not anything useful. I will try again.
Yes they run just fine with the provided filter. |
Running the project from Visual Studio creates the
results
folder in the parent directory just fine. However, running the program from the command line does not produce any output files for some reason.My
Program.cs
contains this:BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
, and I run the benchmark via the command line like this:dotnet run -c Release --framework net7.0
, from the project directory.What is the difference between running it from VS and the command line, and why does the latter not produce the results files?
The text was updated successfully, but these errors were encountered: