Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic outlining (collapsible sections) does not start for .ASPX files in Visual Studio 2010 SP1

In Visual Studio 2010 SP1, automatic outlining is not enabled for ASPX files when I open them. For each file opened, I need to click Edit / Outlining / Start automatic outlining, which is extremely annoying. This step is not necessary when code-only (non-ASPX) files are opened.

I use a few extensions, all of them from MS, including Power Tools, the JavaScript tools, etc., and I thought that maybe they were causing the problem, so I disabled all of them and restarted VS, but the problem still exists.

I did not have this problem with VS2010 (no SP) on Win XP Pro, which I used for about 18 months, but I recently did a clean install of Win 7 x64, VS2010, and VS2010 SP1, and now I have this issue.

Any ideas?

like image 780
BrianFinkel Avatar asked Aug 18 '11 19:08

BrianFinkel


People also ask

How do I enable outlining in Visual Studio?

Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining. Show activity on this post. Show activity on this post. For VS2008, it's under Tools – Options – Text Editor – C/C++ - Formatting - Enter outlining mode when files open.

How do I stop outlining in Visual Studio?

Go to Tools->Options->Text Editor->C#->Advanced and uncheck Enter outlining mode when files open.


2 Answers

This worked for me:

In the registry, look here:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor

for a value named OutlineHTMLOnFileOpen. Mine was set to 0, change it to 1. Make sure you do this while VS is closed, as it saves this value out on exit and will change it back.

like image 59
Moose Avatar answered Oct 12 '22 14:10

Moose


I had this issue and it was driving me crazy all week!!

Finally managed to fix it really easy:

Make sure the registry value for OutlineHTMLOnFileOpen is set to: -1

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor

OutlineHTMLOnFileOpen = -1

Open VS then open an aspx file.

Press CTRL M then M again while keeping the CTRL key depressed.

Press Ctrl+ M M

Wait a few moments and the automatic outlining engine will start.

Restart VS and it should auto kick in again when you open a file.

like image 28
George Filippakos Avatar answered Oct 12 '22 14:10

George Filippakos