dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.89k stars 783 forks source link

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

Open atsapura opened 2 years ago

atsapura commented 2 years ago

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

vzarytovskii commented 2 years ago

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

mvsmal commented 2 years ago

I have exactly the same issue in Rider.

vzarytovskii commented 2 years ago

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.

auduchinok commented 2 years ago

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

mvsmal commented 2 years ago

@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#.

vzarytovskii commented 2 years ago

@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.

atsapura commented 2 years ago

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.