When editing Razor views in Visual Studio 2015 the undo function stops working. I noticed that it seems to when I type @if
and press tab
. Then I sometimes get the a pop up with the error message Operation is not valid due to the current state of the object
and then what appears is something like this, instead of the usual if-statement:
@if (true)
{
/.../
}
I have already tried this solution but it didn't work. Any ideas what is going on?