When I modify a file that is marked as read-only and try to save it, Visual Studio pops up a dialog that indicates the file is write-protected. I select "overwrite". At that point Resharper shows that there are errors on every variable and method call in the file. Closing the file and repoening the file does not help. I have to exit Visual Studio and restart it before resharper will show the file without all the red markings. A compile in Visual Studio (press F6) works fine with no errors, and shows "Build succeded".
Summary to reproduce the error:
1. Close Visual Studio.
2. Mark a file as read-only.
3. Open Visual Studio.
4. Change the file, and save it. Answer "Overwrite" to the pop-up dialog.
5. Resharper incorrectly shows red everywhere in the file.
I have Resharper 5.1.3000.12 on Visual Studio 2010, with the Microsoft Productivity Power Tools loaded. Disabling Productivity Power Tools does not help.
Do you have any suggestions on how to get Resharper to not show fake errors everywhere?
Is there a way to get Resharper to re-process the file without restarting Visual Studio?
(I'd submit a bug, but this problem does not always happen on my second computer).