Link to home
Start Free TrialLog in
Avatar of gillgates
gillgates

asked on

Regions in .NET

I use regions a lot but for some reason they are always opening on their own.  I will close the project, with all the regions collapsed and when I open the project again they will be uncollapsed.  Does anyone know if there is anything I can do about this?  Is anyone else having this problem?

Edit:
Specifically I am talking about the regions for classes, functions, and properties... the ones that VS.NET makes for you

Edit2:
Yes I save the project before exiting.
Avatar of flalar
flalar

Hmmm... Try tools->Options-Editor->C#->Formationg  check/uncheck the "Collapse #regions when files close"

Think that might do the trick

Cheers
Lars Flagan
Avatar of gillgates

ASKER

Lars,

I will try it tomorrow morning at work.  Thanks
U have to Uncheck the "Collapse #regions when files close" checkbox
 
Mine says Collapse #regions when file opens.  Checked or unchecked they are all uncollapsed when I open the project.
The state of your regions are usually saved in your *.user files for each project, are you sure they are not read protected or deleted somehow.

HTH
I have a csproj.user file but no .user file.

This is the contents of the csproj.user file

<VisualStudioProject>
    <CSHARP LastOpenVersion = "7.10.3077" >
        <Build>
            <Settings ReferencePath = "C:\Projects\Classes\evIniFile\bin\Release\;
                 <Config
                    Name = "Debug"
                    EnableASPDebugging = "false"
                    EnableASPXDebugging = "false"
                    EnableUnmanagedDebugging = "false"
                    EnableSQLServerDebugging = "false"
                    RemoteDebugEnabled = "false"
                    RemoteDebugMachine = ""
                    StartAction = "Project"
                    StartArguments = ""
                    StartPage = ""
                    StartProgram = ""
                    StartURL = ""
                    StartWorkingDirectory = ""
                    StartWithIE = "true"
                />
                <Config
                    Name = "Release"
                    EnableASPDebugging = "false"
                    EnableASPXDebugging = "false"
                    EnableUnmanagedDebugging = "false"
                    EnableSQLServerDebugging = "false"
                    RemoteDebugEnabled = "false"
                    RemoteDebugMachine = ""
                    StartAction = "Project"
                    StartArguments = ""
                    StartPage = ""
                    StartProgram = ""
                    StartURL = ""
                    StartWorkingDirectory = ""
                    StartWithIE = "false"
                />
            </Settings>
        </Build>
        <OtherProjectSettings
            CopyProjectDestinationFolder = ""
            CopyProjectUncPath = ""
            CopyProjectOption = "0"
            ProjectView = "ProjectFiles"
            ProjectTrust = "0"
        />
    </CSHARP>
</VisualStudioProject>
ANY ONE?
This is what I ended up doing...

Open VS.NET

Right click on the text editor and goto outlining and select "Toggle all Outlining".
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial