You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# IDE0065: Misplaced using directive
csharp_using_directive_placement = inside_namespace:warning
When attempting to run dotnet format I encounter a NRE when attempting to check this; furthermore this does not return a non-zero exit code which allows this to pass the CI.
C:\GitHub\ManipulativeReplacer>dotnet format --fix-style warn --fix-analyzers warn --check
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.
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(1,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(2,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(3,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(4,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(5,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(6,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(7,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(8,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(1,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(2,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(3,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(4,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(5,1): Using directives must be placed inside of a namespace declaration (IDE0065)
Failed to apply code fix MisplacedUsingDirectivesCodeFixProvider for IDE0065: Object reference not set to an instance of an object.
Format complete in 3824ms.
C:\GitHub\ManipulativeReplacer>echo %errorlevel%
0
My version is as follows:
C:\GitHub\ManipulativeReplacer>dotnet format --version
5.0.142902+8012f4ede1bb9a4e90ac01efd204b0f1ee428f10
Running in Diagnostic verbosity does not return anything more:
C:\GitHub\ManipulativeReplacer>dotnet format --fix-style warn --fix-analyzers warn -v diag --check
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 1649ms.
Determining formattable files.
Complete in 376ms.
Running formatters.
Running Code Style analysis.
Determining diagnostics...
Running 9 analyzers on ManipulativeReplacer.
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(1,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(2,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(3,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(4,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(5,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(6,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(7,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\AboutManipulativeReplacerBox.cs(8,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(1,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(2,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(3,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(4,1): Using directives must be placed inside of a namespace declaration (IDE0065)
ManipulativeReplacer\Program.cs(5,1): Using directives must be placed inside of a namespace declaration (IDE0065)
Complete in 1295ms.
Fixing diagnostics...
Running 1 analyzers on ManipulativeReplacer.
Failed to apply code fix MisplacedUsingDirectivesCodeFixProvider for IDE0065: Object reference not set to an instance of an object.
Complete in 88ms.
Analysis complete in 1384ms.
Complete in 1789ms.
Formatted 0 of 11 files.
Format complete in 3815ms.
C:\GitHub\ManipulativeReplacer>echo %errorlevel%
0
The text was updated successfully, but these errors were encountered:
I have my .editorconfig set like so:
When attempting to run dotnet format I encounter a NRE when attempting to check this; furthermore this does not return a non-zero exit code which allows this to pass the CI.
My version is as follows:
Running in Diagnostic verbosity does not return anything more:
The text was updated successfully, but these errors were encountered: