question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet-format in WSL2 doesn't recognise a cs file

See original GitHub issue

I’m running the following command in Ubuntu 18 (WSL2) but the program doesn’t seem to recognise the cs file.

image

I installed the tool using the following command. /usr/bin/dotnet tool install dotnet-format --tool-path ~/dotnet

I’ve tried other variations of the command with quotes but no luck.

~/dotnet/dotnet-format --files "ShortlistService.cs"
~/dotnet/dotnet-format --files 'ShortlistService.cs'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmarolfcommented, Mar 16, 2020

@JoeRobich should we change it so the --files flag implies the folder flag if not present?

0reactions
JoeRobichcommented, Aug 9, 2020

Closing this issue as we’ve updated documentation on how to filter files - https://github.com/dotnet/format/tree/master/docs#filter-files-to-format. Since we’ve reworked the options in our nightly build, it is required to pass the --folder|-f flag to specify working with the files directly. Please let us know if you have any suggestions for how to improve the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debug Your .NET Core Apps in WSL 2 with Visual Studio
The .NET Core Debugging with WSL 2 – Preview extension lets run and debug your .NET Core apps in WSL 2 from Visual...
Read more >
Cannot `dotnet format` ASP.NET Core projects · Issue #1519
After upgrading to 6.0.2 (6.0.200) I got errors when trying to format projects using the web SDK, i.e. Initially I assumed that I...
Read more >
The .NET Core SDK cannot be located. . ...
Another problem I have when I click on the terminal is this message: The terminal shell path "; C: \ Program Files \...
Read more >
VSCode's shell command `code` no longer working in ...
I think this issue was caused to me by an update of VSCode, which happened automatically. To solve it: open VSCode in Windows....
Read more >
Solution to Visual Studio 2022 messing up ...
In your system environment variable path , Visual Studio 2022 put C:\Program Files (x86)\dotnet\ before C:\Program Files\dotnet\ .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found