dotnet test with multiple TargetFrameworks while specifying output

Viewed 13

I am attempting to run "dotnet test" with the "--output" option to direct the output to a specific location. I want to run all tests for all frameworks so I do not want to have to specify a --framework.

Using the --output works fine for single framework projects using TargetFramework but does not for multiple Targetframeworks with multiple frameworks defined.

I believe that the issue is that by specifying --output it loses the default behavior of placing the build output in the \bin**** directory.

Is there a way to specify --output and still have the framework folders (e.g. \net48, \net6.0) created?

My workaround would be to call dotnet test multiple times including the --output and --framework which I really don't think is the correct answer.

0 Answers
Related