Wednesday, 11 September 2013

R#: On format - page scrolls to top and regions expand

R#: On format - page scrolls to top and regions expand

I have recently started using Visual Studio 2012 with Resharper 8 (Full
Edition) and discovered a very peculiar bug that happens only under
certain circumstances.
Whenever I use Resharper's code cleanup on some of my C# files the view in
the text editor scrolls to the top of the file and all the collapsed
regions and blocks expand. An extremely annoying problem, since I use the
'silent cleanup' of Resharper quite a lot.
It is worth mentioning that the code still gets formatted correctly.
After spending quite some time testing and trying to find the source of
the problem, it seems that I have finally found the cause:
Whenever there are more than 13 <summary> tags in a file this issue will
appear, but if there are 13 or less it won't. Also, it can only happen if
the Reformat embedded XML doc comments option is enabled.
Why this arbitrary number of <summary> tags creates this issue is beyond
me, but I would like to find a solution.
I use the silent cleanup (entire file) option of R# quite often when
writing code and as such the problem has become a big nuisance. Right now
I am forced to circumvent the problem by simply selecting the code that I
have created/edited and formatting it alone, but it is extremely annoying
to do that on a regular basis as all I want to do is click a simple key
combination.
Does anyone else with VS2012 + R# 8 have this problem?
I would like to find a solution to this annoying issue, but I have no idea
what could be causing this.

No comments:

Post a Comment