Microsoft.VisualStudio.Web.CodeGeneration.Design version: 6.0.8
Target framework: .NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.3.0
When scaffolding an Edit view, the generated cshtml includes the .form-group class which has been removed from Bootstrap 5:
https://getbootstrap.com/docs/5.0/migration/
Breaking: Dropped form-specific layout classes for our grid system. Use our grid and utilities instead of .form-group, .form-row, or .form-inline.
This means the spacing isn't correct on the generated HTML
<div class="form-group">
<label asp-for="Id" class="control-label"></label>
<input asp-for="Id" class="form-control" />
<span asp-validation-for="Id" class="text-danger"></span>
</div>