Why do I keep getting mixed tabs and spaces in a Visual Studio 2010 C# code window?

ProfK picture ProfK · Mar 14, 2011 · Viewed 28k times · Source

I have just been working on a C# file (Global.asax.cs) in a web application for the last hour or so, and I have been shown the prompt to "tabify" or whatever about four times. Each time I choose to tabify and save the files, yet at some seemingly random point later on, I get prompted again.

I am using ReSharper, yet this doesn't happen when I code at home, also using ReSharper. Only at work.

Answer

Justin Saraceno picture Justin Saraceno · Mar 14, 2011

Are you using the Productivity Power Tools VS 2010 extension? If so, go to Tools -> Options -> and choose Productivity Power Tools. Here you can turn off the option to Fix Mixed Tabs. This will turn off this warning.

Power Tools for Visual Studio 2010

Power Tools for Visual Studio 2012

Power Tools for Visual Studio 2013

Power Tools for Visual Studio 2015