I am not expert with blazor pages and I do not understand why autoformatting the code in Visual Studio 2019 16.5 happens this:
<MatChipSet>
@foreach (var role in @UserRow.Roles)
{
<MatChip Label="@role"></MatChip>
}
/**/
/**/
</MatChipSet>
At every format a new "/**/" is put inside.
Yup. I have same issue with MatSelect
This happens with MatTable as well. Been an issue for several months.
I'm not sure the problem comes from MatBlazor, I have the same issue with span so I suspect the fall is on MicroSoft side.
In all my cases the issue appears when mixing c# with html (but not always)
My "ugly" workaround is to add a single c# statement just before the initial c# code line
@if (true) // => avoid editor bug
@foreach (var city in ViewModel.Cities)
{
<span title="@city.Label">
}
I sent an issue from Visual Studio...
https://developercommunity.visualstudio.com/content/problem/968803/-added-after-autoformat-razor-page-blazor.html
Hi!
This is a bug in Visual studio but fortunately they have a fix pending for release:
A fix for this issue has been internally implemented and is being prepared for release. We鈥檒l update you once it becomes available for download.
-- Visual Studio Feedback System Apr 17 at 10:50 AM
Closing the issue.
Most helpful comment
Hi!
This is a bug in Visual studio but fortunately they have a fix pending for release:
Closing the issue.