Question

I am baffled. The usual shortcuts worked yesterday when I left for home. Today I started the computer, opened the project, and before writing a single line of code, wanted to collapse to definitions in an aspx file. It didn't work, and the status bar shows the message

The key combination (Ctrl+M, Ctrl+O) is bound to the command (Collapse to definitions) which is not currently available

I am in normal editing mode, not in debugging. The same combination works on .cs files, but has stopped working on .aspx files. I found on the Internet posts about experiencing the same problem when updating to a new addon version, but I don't have the addons mentioned. I tried to change into design view and back but this didn't change anything.

How do I get my outlining back?

Was it helpful?

Solution 2

This command is printed when all outlining regions in the file are already collapsed to definitions. For example, if you execute the command Collapse to Definitions twice, you will always get this message the second time. The same thing happens if you execute Expand All Definitions when all regions in the file are already expanded. One of the following things has happened.

  1. The language service did not report any outlining regions in the file. In C#, this always occurs if the following option is not checked:

    Tools → Options... → Text Editor → C# → Advanced → Enter outlining mode when files open

  2. The Edit.StopOutlining command was executed (Edit → Outlining → Stop Outlining, or Ctrl+M, P).

  3. All regions in the file are already collapsed.

  4. You have identified a bug in the IDE, which you should report to Microsoft Connect.

OTHER TIPS

The shortcuts Ctrl+M,O or Ctrl+M,Ctrl+O do not work in .ASPX files. Try Ctrl+M,L instead.

Check the Edit -> Outlining menu for available actions.

In my case worked HotKey: "CTRL + M","CTRL + H" or "CTRL + M","CTRL + T"

In my case, I accidentally disabled outlining all to gether.

One can reactivate it by searching for "outlining" in the Visual Studio Search bar (CTRL + Q) and enabling the feature "Start Outlining automatically" again.

Hope this helps anyone encountering the same issue and finding this question!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top