My settings have been clobbered, yet again.

So often after upgrading RS it loses my option settings. Today, I upgraded to 1181 and it seemed to be ok until I added some code. Once again my settings have been messed up and it's a pain to have go through them and keep resetting them.

Take a look at my screenshot. Notice that I have enabled the setting to put spaces around the == operator. Take a look at the sample "if" statement I added after applying the settings and restarting VS. Notice that the code completion has failed to put the spaces around the ==.

Why do I have this problem with the settings so often. I'm not doing anything to them from one release to another yet quite often, installations are screwing them up. As much as I love RS, this is one behaviour that continues to annoy me. Does anyone have any idea what's going on?



Attachment(s):
rsscreenshot.jpg
5 comments
Comment actions Permalink

Hello,

Is it possible you have VS formatting enabled? Check in Tools, Options, Text
Editor, C#, Formatting.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> So often after upgrading RS it loses my option settings. Today, I
IR> upgraded to 1181 and it seemed to be ok until I added some code.
IR> Once again my settings have been messed up and it's a pain to have
IR> go through them and keep resetting them.
IR>
IR> Take a look at my screenshot. Notice that I have enabled the setting
IR> to put spaces around the == operator. Take a look at the sample "if"
IR> statement I added after applying the settings and restarting VS.
IR> Notice that the code completion has failed to put the spaces around
IR> the ==.
IR>
IR> Why do I have this problem with the settings so often. I'm not doing
IR> anything to them from one release to another yet quite often,
IR> installations are screwing them up. As much as I love RS, this is
IR> one behaviour that continues to annoy me. Does anyone have any idea
IR> what's going on?
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5232945#5232945


0
Comment actions Permalink

Iiya,

Is there anything specific you want me to look at? I can't find anything obvious and what there is set seems to be ok.

I did notice something. If I have this statement:

if(hhmm==5) then it does add the spaces if I add a semicolon, so I end up with if(hhmm == 5) ;

But if I introduce just the braces, then nothing happens to format and put the spaces around the ==. All I get is if(hhmm==5){}

Does that suggest anything to you? I really can't find anything specific that could explain it.

0
Comment actions Permalink

Hello,

What happens when you run R#'s Reformat Code? Actually, R# would not apply
much of its formatting when you're just typing. This is done by a Reformat
run.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

Serge,

It is true that the semicolon does perform immediate reformatting of the statement. I selected all of the code and reformatted using the code cleanup item and the "if" statements were then correctly formatted as well, exactly as you suggested. Is it possible that all this time I have been coding like an automaton and add the spaces to the operators myself without realising it?

Perhaps I need to get psychiatric counselling?

But, the fact is my settings do get nuked somehow. Yesterday, I trawled through a number of settings that mysteriously had been reset. I need to get into the habit of changing my settings and then saving the Resharper folder where the user settings are stored. That way, I can reinstate them after upgrades. Does that sound a safe strategy? I don't know if the RS installation would ever introduce new user settings that might cause unpredictable behaviour if I overwrite them with a backup. Is that something you can comment on. Another idea would be to add buttons to the dialog to let you back them up or restore them from somewhere else?

0
Comment actions Permalink

Hello,

It is true that the semicolon does perform immediate reformatting of
the statement. I selected all of the code and reformatted using the
code cleanup item and the "if" statements were then correctly
formatted as well, exactly as you suggested.


I guess it's because the semicolon-reformatting is coming from Visual Studio,
which might have its settings different from what you have in R#, regarding
"if" spacing and such. Probably VS formatting should either be suppressed
or set up in accordance with R#'s.

But, the fact is my settings do get nuked somehow. Yesterday, I
trawled through a number of settings that mysteriously had been reset.
I need to get into the habit of changing my settings and then saving
the Resharper folder where the user settings are stored. That way, I
can reinstate them after up grades. Does that sound a safe strategy? I

don't know if the RS

installation would ever introduce new user settings that might cause
unpredictable behaviour if I overwrite them with a backup. Is that
something you can comment on. Another idea would be to add buttons to
the dialog to let you back them up or restore them from somewhere else?


New major versions of R# do not reuse the old settings file, as the settings
folder has the product version number in its name. The older settings are
migrated on the first run. Thus, backing up the settings and restoring them
should not cause any much trouble.

Under normal conditions (for example, without killing the Visual Studio process)
R# settings shouldn't get lost or changed mysteriousely. At least we do not
know any strong cases of such behavior.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.