1

I've just installed Visual Studio 2017 and began writing my ASP.NET MVC 5 web app. I've come across this issue where the indentation of code is not correct. What I noticed is that when I hit the semicolon on var priv = new Phonebase(); it will shift out of the scope that it belongs to.

I've played around with indentation settings for C#, but I couldn't remedy the issue. I've tried smart indentation and block indentation. Does anyone know how I can get Visual Studio to ident lines of code properly?

Incorrect indentation

Alex Wang
  • 358
  • 3
  • 21
  • Have you tried playing with the tabs space/indention options at Tools->options->Text Editor->All languages->(select langauge)? – Rachael Jul 13 '17 at 19:55

1 Answers1

1

I found a .editorconfig file in the root of my c drive (c:\.editorconfig). When I deleted this file, this issue went away for me.

See this page for more information and fixes with .editorconfig

Josh
  • 2,142
  • 2
  • 23
  • 20