Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Warnings were encountered while loading the workspace" But No Warnings Shown in -v diag? #837

Closed
aolszowka opened this issue Oct 17, 2020 · 5 comments · Fixed by #841
Closed
Labels
Bug This issue describes behavior that is not working as expected
Milestone

Comments

@aolszowka
Copy link

aolszowka commented Oct 17, 2020

Attempting to use this tool over an open source project I have (ManipulativeReplacer) throws this warning:

Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.

However running this in diagnostic verbosity -v diag shows no warnings in loading the workspace, Is this a bug?

*EDIT: Forgot to mention the version:

C:\GitHub\ManipulativeReplacer>dotnet format --version
5.0.142902+8012f4ede1bb9a4e90ac01efd204b0f1ee428f10

Complete output:

C:\GitHub\ManipulativeReplacer>dotnet format ManipulativeReplacer.sln --fix-style warn
  Formatting code files in workspace 'C:\GitHub\ManipulativeReplacer\ManipulativeReplacer.sln'.
  Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
  Format complete in 4108ms.

C:\GitHub\ManipulativeReplacer>dotnet format ManipulativeReplacer.sln --fix-style warn -v diag
  The dotnet runtime version is '3.1.7'.
  The dotnet CLI version is '3.1.401'.
  Using MSBuild.exe located in 'C:\Program Files\dotnet\sdk\3.1.401\'.
  Formatting code files in workspace 'C:\GitHub\ManipulativeReplacer\ManipulativeReplacer.sln'.
  Loading workspace.
  Complete in 1768ms.
  Determining formattable files.
  Complete in 391ms.
  Running formatters.
  Running Code Style analysis.
  Determining diagnostics...
  Running 6 analyzers on ManipulativeReplacer.
  Complete in 1343ms.
  Fixing diagnostics...
  Complete in 6ms.
  Analysis complete in 1349ms.
  Complete in 1760ms.
  Formatted 0 of 11 files.
  Format complete in 3923ms.
@aolszowka
Copy link
Author

This is still failing as of 5.0.151902+eadde172822e75922a68332d1037972f1fcec791

Complete output to follow:

C:\GitHub\ManipulativeReplacer>dotnet format ManipulativeReplacer.sln --fix-style warn
  Formatting code files in workspace 'C:\GitHub\ManipulativeReplacer\ManipulativeReplacer.sln'.
  Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
  Format complete in 3507ms.

C:\GitHub\ManipulativeReplacer>dotnet format ManipulativeReplacer.sln --fix-style warn -v diag
  The dotnet runtime version is '3.1.9'.
  The dotnet CLI version is '3.1.403'.
  Using MSBuild.exe located in 'C:\Program Files\dotnet\sdk\3.1.403\'.
  Formatting code files in workspace 'C:\GitHub\ManipulativeReplacer\ManipulativeReplacer.sln'.
  Loading workspace.
  Complete in 1805ms.
  Determining formattable files.
  Complete in 358ms.
  Running formatters.
  Running Code Style analysis.
  Determining diagnostics...
  Running 7 analyzers on ManipulativeReplacer.
  Complete in 1370ms.
  Fixing diagnostics...
  Complete in 6ms.
  Analysis complete in 1376ms.
  Complete in 1511ms.
  Formatted 0 of 11 files.
  Format complete in 3677ms.

C:\GitHub\ManipulativeReplacer>dotnet format --version
5.0.151902+eadde172822e75922a68332d1037972f1fcec791

@JoeRobich
Copy link
Member

@aolszowka Thanks for logging this issue!

@JoeRobich JoeRobich added the Bug This issue describes behavior that is not working as expected label Oct 19, 2020
@JoeRobich
Copy link
Member

@aolszowka
Copy link
Author

Confirmed Fixed Thank you!

@jmarolf jmarolf added this to the 5.0 milestone Feb 11, 2021
@OtgonjargalKh
Copy link

how to fix this error during c# code linting through dotnet format in command line when new project created with win ui 3 ? "Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings."

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug This issue describes behavior that is not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants