Analysis "thrashing" when switching branches (Mercurial, Git)

We use Mercurial as our source control for a large MVC project, and have several branches. Whenever we switch between branches, ReSharp complely flips out, and begins analysing thousands of files.  It could take hours for the analysis to complete, and sometimes we are switching between branches several times throughout day, which basically results in ReSharper analysis files forever, for example, getting half-way done, then we switch to another branch, and it has to start all over again.

Worse, during this re-analysis, it will often flag hundreds of files as having errors (mostly cshtml files for Views, but sometimes class files). Often, the errors are on referrences to the Model referrence on the View page, but again other things may be flagged as an error occassionally as well. These are false positivies, and once analysis complete, if we click "Reanalysi files with errors", it will analyise them again and determine they are correct.

But, once we switch branches again, we go through this all over again.

This also happens whether or not VisualStudio is open when we switch branches. If closed, this extreme slow re-analysis will start up, and it will flag lots of false positivies as it does so.

Does anyone else who uses Mercurial or Git, or similar VCSes, experience this issue? If do you, how do you manage it or mitigate the problem? If you don't experience this issue, how are you avoiding it?

4 comments
Comment actions Permalink

You didn't include what version of resharper / VS.

Resharper has always struggled when you change branches with VS open, however doing it with VS closed usually has been the goto method. So i assumet his R# 10 since i've worked with R# for years and haven't seen what you said. And R# 10 made me uninstall it and downgrade to 9.

0
Comment actions Permalink

It is ReSharper 10 on VisualStudio 2012. However, we had the same problem with ReSharper 9.

0
Comment actions Permalink

The same problem with R#9 even when you close VS, switch branches, then open VS?

0
Comment actions Permalink

Yes. This was orginally a problem in version 9, as described above, and I was hoping it would be better in version 10. It was not.


0

Please sign in to leave a comment.