fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Code navigation and syntax highlighting in MSVS breaks after switching Git branches

Open atsapura opened this issue 2 years ago • 7 comments

Sometimes (not always, unfortunately) syntax highlighting and navigation breaks in some tabs, not all of them though.

Repro steps

  1. Have a solution open, multiple tabs open, some of them pinned (not sure if it matters). In my case, a lot of tabs were open.
  2. Switch branch, I suspect, it's better if it leads to projects or solution being reloaded.
  3. Hope that you caught the issue this time.

Expected behavior

This doesn't happen, code navigation and highlighting remain intact.

Known workarounds

Reopen Visual Studio.

Related information

  • Operating system: Win 10
  • .NET Runtime kind: dotnet 6.0
  • MSVS version: 17.2.5, but it was definitely present in some of the earlier versions as well.

atsapura avatar Jul 12 '22 14:07 atsapura

This is, apparently, different to the project-system bug we've fixed recently (#12982)

vzarytovskii avatar Jul 12 '22 14:07 vzarytovskii

I have exactly the same issue in Rider.

  • Operating system: Win 11
  • .NET Runtime kind: dotnet 6.0
  • Rider version: 2022.1.1 & 2022.1.2

mvsmal avatar Jul 13 '22 10:07 mvsmal

I have exactly the same issue in Rider.

  • Operating system: Win 11
  • .NET Runtime kind: dotnet 6.0
  • Rider version: 2022.1.1 & 2022.1.2

Rider should probably be reported to the JB's YouTrack.

vzarytovskii avatar Jul 13 '22 10:07 vzarytovskii

@mvsmal Could you file an issue at our tracker and attach logs there, please?

auduchinok avatar Jul 13 '22 10:07 auduchinok

@vzarytovskii @auduchinok Will do.

Just thought since it looks like exactly the same issue it might be somewhere in a shared place (FCS?). Just a wild guess, I have no idea what VS and Rider have in common in regards to F#.

mvsmal avatar Jul 13 '22 10:07 mvsmal

@vzarytovskii @auduchinok Will do.

Just thought since it looks like exactly the same issue it might be somewhere in a shared place (FCS?). Just a wild guess, I have no idea what VS and Rider have in common in regards to F#.

Yeah, in vs it's most likely project system or us not kicking in re-check.

vzarytovskii avatar Jul 13 '22 10:07 vzarytovskii

UPD: Just caught it once more and this time 1 file got stuck so hard, that even reopening VS didn't solve it. Clean/Rebuild didn't solve it. The only thing that did fix it was manual deleting of all the bin and obj folders.

atsapura avatar Jul 18 '22 13:07 atsapura