Roslyn: EditorConfig not working under Visual Studio 2019

Created on 4 Apr 2019  路  2Comments  路  Source: dotnet/roslyn

Version Used:
Microsoft Visual Studio Professional 2019
Version 16.0.0
Microsoft .NET Framework
Version 4.7.03056

Steps to Reproduce:

  1. Create .editorconfig at solution level
  2. Add Rules
  3. Open .cs file and add new method.
  4. Apply autoformatting (CTRL + K, CTRL + D)

Expected Behavior:
Formatting is applied. Methods where formatting isn't applied are displayed as errors.

Actual Behavior:
Nothing happens.

Other Information:
This was working fine for me in Visual Studio Professional 2017.

Area-IDE Question Resolution-Answered

All 2 comments

The experimental Code Cleanup on Format Document feature was removed for Visual Studio 2019. The new Code Cleanup feature is available via the broom icon at the bottom of editor windows. I was sure there was a duplicate issue for this already, but I'm having trouble finding it.

Does that mean we have to use both features on the same document to have the same behavior as in VS2017? Or does the Code Cleanup feature also triggers the Format Document feature?

Was this page helpful?
0 / 5 - 0 ratings