Search code examples
c#visual-studio-2017visual-studio-communityeditorconfig

.editorconfig is not working in Visual Studio 2017 when my sotution is not in my C: drive?


I have added a .editorconfig file at my solution base folder but Visual Studio 2017 keeps using its settings, but this happenes just when the solution folder is not in the C: drive (if the solution folder is in the C: drive .editorconfig file is working perfectly).

I have also tried to add .editorconfig file to each project of the solution but still the same problem.

Note that I have root = true in my .editorconfig file.

I am using the following version of Visual Studio:

Microsoft Visual Studio Community 2017 version 15.2 (26430.06)


Solution

  • I somehow figured out how to solve this problem.

    My solution folder had a parent folder named between square brackets [] like this [ParentFolderName] so I removed the square brackets and everything worked as expected.

    For a reason or another editorconfig file does not do anything when the solution folder has a parent folder named between square brackets. The IDE (in my case Visual Studio 2017) uses its settings.