-
Notifications
You must be signed in to change notification settings - Fork 676
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
Omnisharp randomly ignores editorconfig settings, requires restart #4184
Comments
@stewartadam Not sure if it is a typo, but editorconfig files do not have a ".json" extension. They should simply be named |
Thx, it was a typo -- can confirm the file is |
I can confirm the problem. I also have to restart OmniSharp constantly to get rid of warnings that appear because the .editorconfig settings are not taken into account. |
fwiw, I've noticed it pretty consistently on Azure Function projects if I run 'dotnet clean' and delete the You click yes, yes, yes... and by the time it's all done, omnisharp is loaded but ignores editorconfig. |
Started seeing the same behavior with C# extension 1.23.6. For me, the trigger that causes OmniSharp to start ignoring the When I load the workspace for the first time, everything works fine and all settings are respected. The moment I rebuild, OmniSharp outputs the following:
After that, all settings in the |
I am seeing the same behavior in my Unity projects and that happens everytime I create a C# file inside the Unity editor. When I do that, I switch back to VS Code and I get welcomed by a bunch of warnings and sqwiggly lines. An omnisharp restart gets rid of that but it is annoying in the long run. |
This appears to be happening for me.. when I run |
Issue Description
I have editorconfig and roslyn analyzers support both enabled in my omnisharp preferences, and a
.editorconfig
in my repo root that applies for all projects in the tree.Omnisharp generally does pick up on this and respect the settings, however seemingly at random Omnisharp will drop the editorconfig settings and revert to the default rule set and make recommendations against the editorconfig. Specifically, this is present in editorconfig:
After some time, when the bug triggers I'll start seeing recommendations for SA1101 to remove 'this'. Restarting omnisharp fixes the issue (temporarily).
Steps to Reproduce
Load C# project and edit it
Expected Behavior
omnisharp respects editorconfig; don't have to constantly restart omnisharp
Actual Behavior
Have to restart omnisharp every few minutes
Logs
OmniSharp log
Debug log has some details from a private repo; reach out to me directly for logs
C# log
See above
Environment information
VSCode version: 1.50.1
C# Extension: 1.23.5
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.403 Commit: 9e895200cdRuntime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.403/
Host (useful for support):
Version: 3.1.9
Commit: 774fc3d6a9
.NET Core SDKs installed:
3.1.403 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: