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

dotnet test --diag somefile fails (without .txt extension on filename) #3045

Closed
AArnott opened this issue Sep 9, 2021 · 1 comment · Fixed by #3048
Closed

dotnet test --diag somefile fails (without .txt extension on filename) #3045

AArnott opened this issue Sep 9, 2021 · 1 comment · Fixed by #3048
Assignees
Labels

Comments

@AArnott
Copy link
Member

AArnott commented Sep 9, 2021

Description

The dotnet test command fails when given a diagnostic file path that does not use .txt as a file extension.

The --help documentation on the command simply says:

-d, --diag <LOG_FILE> Enable verbose logging to the specified file.

So I expect that -d somefile should work.

Steps to reproduce

Run any test with the dotnet test -d somefile command (literally call it somefile -- don't change it to somefile.txt).

Expected behavior

The test runs and somefile contains diagnostic logs.

Actual behavior

The test runner fails with this error:

Diag file path 'C:\git\VS.RPC.Contracts\somefile' is not valid.

Diagnostic logs

LOL. No diag log available. That's the bug.

Environment

.NET SDK v5.0.400
Windows 10

@AArnott
Copy link
Member Author

AArnott commented Sep 9, 2021

My primary concern is discoverability of this. The docs don't state this requirement and the error message doesn't explain the problem either.

@nohwnd nohwnd self-assigned this Sep 9, 2021
@Haplois Haplois added the triaged label Sep 9, 2021
nohwnd added a commit to nohwnd/vstest that referenced this issue Sep 10, 2021
Files with no extension are totally valid files, even though they are unusual on Windows

Fix microsoft#3045
nohwnd added a commit to nohwnd/vstest that referenced this issue Sep 10, 2021
Files with no extension are totally valid files, even though they are unusual on Windows

Fix microsoft#3045
nohwnd added a commit that referenced this issue Sep 10, 2021
Files with no extension are totally valid files, even though they are unusual on Windows

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

Successfully merging a pull request may close this issue.

3 participants