For me, none of the other solutions worked. The things I tried:
After checking if the problem was persistent over different projects, it turned out that the problem only occurred in one specific projects. I figured that I had to delete all the user specific files in the solutions folder (such as bin, obj, *.suo, ...) I just deleted the whole solution folder and reverted the files in git.
TLDR: Try deleting user specific files/folders like bin, obj, *.suo, ...