Visual Studio 2010, used to auto indent my lines, and now suddenly it won't do that, for example, when I created a method, it looked like that:
public static void Foo (int FooInt) { // Some methods stuff... }
but now, it looks like that:
public static void Foo (int FooInt) { // Some method stuff... }
I can't find any answer for that, what can I do?
I am using Visual Studio 2010, Windows 7 64 Bit
Update: Turns out my problem on resides on C#, when I am trying it on a C++ project, indentation work perfectly... Any suggestions?
Update:
Problem was solved, unexpectedly by re-installing Windows.
I was having the same problem and after changing Indenting from Block to Smart it started working!
Check your indentation settings in Visual Studio - Tools|Options.. => Text Editor > C# > Formatting > Indentation:

If the project wont build the auto indent wont work.
The short command for indent in VS 2010 is ctrl + K + D
I don't know what the problem is precisely, but I'll take a shot in the dark. Under Tools->Options->C#->Tabs, what is the value?

Another potential solution to this problem if all of the settings in VS2010 seem to be correct is to check for characters from other character encodings. For example, if one accidentally places left and right quotes inside the source code, it could prevent visual studio from automatically formatting your code. Sometimes you get an error to help you identify such a situation, sometimes it is more latent and a pain to find.