views:

151

answers:

3

Visual Studio 2008 is doing something that really frustrates me. I open a javascript file and start editing my code and it places the opening brace on the same line rather than on a new line. So I go to the text editor options and tick the boxes to put the braces on a new line and all is fine until the next day when I open a js file and it puts the braces on the same line again! Grrrrr :-(

Does anyone know how to get Visual Studio to remember the settings so I don't have to change them all the time?

A: 

Well, I was having a similar problem - Visual Studio lost the settings for line numbers - every time I opened Visual Studio, I had to go to settings and mark the check-box to show the line numbers.

I got over this issue by configuring all the options the way I like, exporting and importing it back again. After this, I never had to go and mark the check-box for the setting.

You can give it a try, it might work for you as well.

fixed
A: 

I just tried this on my machine and it is remembering the settings between the sessions (open and close VS). And, I did not do any workarounds.

I was also getting very annoyed by this formatting as we dont have this coding standards. We use braces on the new line no matter what.

Harsha
+1  A: 

When I've seen this happen, I suspect the cause has been having multiple instances of Studio open, and setting the option in one instance doesn't set it in the others. If you close down the instance where you've set it, and then close down another instance I think that's the point at which it gets unset.
Try opening just one instance of Studio, setting it how you want, and closing it down again, and see if it then gets remembered a bit better.

PhilPursglove