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.

Attempting to use --include with a specific file in my project, doesn't do anything

See original GitHub issue

When I try to call dotnet format ./My/Project.Sln --include My/Folder/SomeFile.cs, I keep getting 0 of X files updated, even with implicit issues that would be fixed if I only called dotnet format ./My/Project.sln

I’ve already tried using --fix-styles, and it still does not work. It seems if I use any --include, it actually does not include the file(s) associated.

dotnet --version
5.0.103
dotnet format --version
5.0.211103+b95e1694941ca2595941f1c9cd0d9727b6c53d43

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
JoeRobichcommented, May 7, 2021

@rizengie & @vruss I believe the issue you are both running into is that the --include paths should be relative to your workspace. This is an area we can improve since it is unintuitive.

Just to confirm.

@rizengie does dotnet format ./SDK/SDK.sln --include SDK/Client.cs -v diag work? @vruss does dotnet-format.exe --check --include \Blob.cs -v diag --fix-style warn C:\tfsagent\_work\3\s\src\Monitor.Service.Contracts\Monitor.ComponentModel\Monitor.ComponentModel.csproj work?

0reactions
rizengiecommented, May 11, 2021

Hey, that works! Thanks so much 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot open include file with Visual Studio - c++
Last thing you can do, is to Right click project -> Add -> New item -> Header file and then include it, the...
Read more >
include - Manual
Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in...
Read more >
Troubleshoot broken references - Visual Studio
In the Folder field, type the path of the folder that contains the item you want to reference. Select Add Folder. Referenced file...
Read more >
Importing files from other projects | Looker
You can import files from other LookML projects and external repositories into your current project. This lets you use model files, view files, ......
Read more >
PIO library doesn't see header files in project's include folder
The problem is, that PlatformIO doesn't see header files that are referenced by the library, but are present in the projects include folder....
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