Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inconsistent length calculation in projection snapshot

In Visual Studio 2017 something unexpected happened when I was working. I was editing razor view (nothing special, just normal editing - I've copy pasted small chunk of text) and all the sudden I've got this message:

enter image description here

I've tried to restart visual studio, delete suo file, delete my temporary folder... now I can not work inside this particular view. If I try to change anything in this .cshtml I got message above or this message:

enter image description here

What is this? I don't recall seeing this in previous versions of visual studio. How to avoid this and proceed with work?

like image 323
FrenkyB Avatar asked Sep 06 '18 18:09

FrenkyB


2 Answers

I got this in VS 2019 and just needed to restart VS.

like image 164
Tony L. Avatar answered Oct 20 '22 04:10

Tony L.


I found an issue and they claim the issue was fixed in the new version. So I updated, but the issue still occurred, maybe because it was triggered in the old version.

Clean/rebuild didn't work. What I ended up doing after updating (I don't know if all steps are necessary, but this worked for me):

  • Copy the contents of the old file (make edits if necessary, I didn't have valid .cshtml at the time and I didn't want to run into the same error again)
  • Created a new file and paste the contents in there
  • Delete the old file
  • Commit code
  • Rename old file to new name
  • Commit code again

Then it was solved

like image 31
Daniël Camps Avatar answered Oct 20 '22 05:10

Daniël Camps