Ryan Elkins
Ryan Elkins

Reputation: 5797

Why is auto formatting "not available" for cshtml in my Visual Studio?

While searching for an answer to this I've seen enough posts on here about the issues with the auto formatter to know that auto format should be possible. However, when I ctrl-k+ctrl-d I get:

"The key combination (Ctrl+K, Ctrl+D) is bound to command (Format Document) which is not currently available."

Any idea what gives? I just reset my settings to use C# settings (they were set to Web Development prior) but that didn't do anything.

Upvotes: 2

Views: 1914

Answers (1)

Ryan Elkins
Ryan Elkins

Reputation: 5797

The issue turned out to be that the computer I was using had not been updated to .NET 4.0 - updating the framework resolved the issue. I was thrown off a bit because the project would still build and run fine.

Upvotes: 3

Related Questions