Breaking Auto Format in Visual Studio 2008

Visual Studio LogoGot a quickie today.  After last weeks stink in *nix administration, I am grounded back into the Microsoft way.  I have to say, I do like Visual Studio as a development environment.  I have run into a small, but annoying quirk with the program.

Normally the command CTRL-K, CTRL-D will auto format your code in a very satisfying, and pleasing manner if Visual Studio has broken down in auto-formatting your text.

However, this seems to mess up sometimes if you paste large chunks of code into your document.  After doing so, you may see an error message like this at the bottom:

ctrl+k, ctrl+d is bound to command format document which is not currently available

To work around this, save your changes and reopen the document.

Leave a Reply