fluentui-blazor: fix: Visual Studio 2022 freezes and then crashes with v3-RC-1

šŸ› Bug Report

After updating the NuGet packages from v2.4.2 to v3.0.0-RC-1 on a .Net 8 Preview 7 Blazor project, Visual Studio 2022 v17.8.0 Preview 1.0 freezes and then crashes within a couple of minutes while trying to edit a razor file.

šŸ’» Repro or Code Sample

Note: The following should provide a way for you to reproduce the issue, but the issue manifests itself without doing these things either… it just takes a little longer to crash. I feel like the issue has to do with the Icons package somehow.

  1. Clone the repo here: https://github.com/StevenRasmussen/FluentUIBlazorIssue
  2. Open the solution
  3. Open the Index.razor file
  4. Try ā€œGoing to definitionā€ on the Delete icon name or the Icon parameter of the FluentIcon component on line 9.
  5. Then move your cursor back and forth between those two and hover over them to get the tooltip to show. Usually within performing this 4-5 times, VS will freeze and crash. Here’s a video of it:

2023-08-24_15-27-20

šŸ¤” Expected Behavior

VS does not freeze and crash

šŸŒ Your Environment

Windows 10 - Latest updates installed VS 2022 v17.8.0 Preview 1.0 .Net 8.0.100-preview.7 Microsoft.Fast.Components.FluentUI v3.0.0-rc-1 Microsoft.Fast.Components.FluentUI.Icons v3.0.0-rc-1

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 30 (1 by maintainers)

Most upvoted comments

It does not crash anymore when F12 or ā€œGo To Definitionā€ on my side. Thanks guys!

@vnbaaij - I can confirm that this DOES NOT only happen when you F12 or ā€œGo To Definitionā€. I spent the day yesterday upgrading from v2 in one of my projects and never used the ā€œGo To Definitionā€ but VS consistently crashed about every minute. This is due to the fact that the largest breaking change is with regards to how Icons are handled now. Everywhere you use FluentIcon you have to change the old property Name to Icon. This is where I believe VS struggles and will be a HUGE pain point for anyone when they go to upgrade. I had to kill VS in Task Manager (because I was impatient and did not want to wait for it to crash) every time I upgraded a component that had any FluentIcons that needed changing. It was a race to try and get as many of them updated in a razor page until VS would crash (usually within 20 seconds).

If you’re not going to do anything any time soon with regards to this design, then I would highly suggest you put a large banner on the ā€˜Upgrade’ page saying that Visual Studio WILL crash multiple times if you have any occurrences of FluentIcon that need to be upgraded.

The good news is that now that my project is upgraded it has finally become ā€œstableā€ and I haven’t experienced a crash since.

On a side note… I don’t feel like this ticket should be closed since the issue is clearly not fixed.

I’m trying to get the Visual Studio team involved on this.

Finally, I can confirm it no longer freezes or crashes the Visual Studio with v3.0.1

No, we have the issue I just linked too. This is the code that is called from VS. That is where the problem is.

As said before, I already involved the VS team. In fact we even pinpointed where exactly the problem occurs. See https://github.com/icsharpcode/ILSpy/issues/3075. Don’t know when this will be implemented in a VS release. We are trying to get a workaround/different solution in place. Also, no ETA on that.

For now, I would advise to try to go to the latest VS version. Or even preview (as you can have multiple versions of VS installed side by side). According to earlier reports shared here less problems seem to arise then

I received some pointers/steps to investigate from my internal contact. Will take a look tonight to see if we can find the culprit…

Facing same issue with .Net 7 and Fluent Blazor v3 Stable on Visual Studio 17.7.2 Latest Stable

@vnbaaij Anything on this? it’s really getting on our way on using v3