I need a workaround for Resharper when it says "Failed to modify documents." Does anyone know why he is doing this and how to get around this?

I noticed several times over the past months that sometimes I will use the little yellow lightbulb icon and right-click it and select the option so that it fixes something for me, and then it just highlights that it is going to fix it and a message appears with the message "Failed to change documents."

Has anyone had this problem?
Do you know how to overcome it?
It is almost as if resharper thought that the document is read-only or something else, although I can manually edit the document.

+79
git c # visual-studio-2013 resharper
May 9 '14 at 16:02
source share
6 answers

I had the same issue with Visual Studio 2013.
The solution was to add the project to version control (git in my case).

Now you don’t have to make commits if you don’t want to, just add a version control solution and the problem should go away.

+29
May 09 '14 at 16:16
source share

Disable the Visual Studio source control plug-in.

  • Tools → Options → Source Control
  • Change the Current Control Source Plugin from Microsoft Git Provider to None
+174
Aug 20 '14 at 7:22
source share

What a trick for me was unloading and reloading the project, which contains a file that cannot be modified. (Just right-click on the project and select "Unload Project" from the context menu.

+3
Dec 14 '16 at 13:42 on
source share

I started VS 2013 as an administrator and opened a project, and now it works great.

+1
Oct 03 '16 at 9:16
source share

Let me call you back a bit:

I solved this error by adding a .gitignore file and try to commit my changes.

I cannot explain how this was resolved, however this happened to me in a completely new git repository. I used git and VS for several moths in another repository that had a beguining .gitignore file, and neither I nor anyone on my team had this problem before.

0
Jun 08 '17 at 11:55 on
source share

Changing the "Microsoft Git Provider" worked, but I wanted to find a permanent solution.

I already used Git and had all ReSharper stuff in my .gitignore. I used VS 2015. When I upgraded to the latest version of ReSharper 2017.1.3, this problem arose.

I made a backup of my solutions folder (called "repo_backup") and then cloned my repo from git. Everything worked fine again. I copied my changes to a new repo cloning, deleted repo_backup, and then continued on.

0
Jun 29 '17 at 7:48
source share



All Articles