Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation bug with AddRazorRuntimeCompilation() to an ASP.NET Core Web App (MVC) project
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
I made a brand new .NET 6 project with VS22, I added Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package (version 6.0.1) from NuGet to the project, then I have added in the Program.cs:
`var builder = WebApplication.CreateBuilder(args); `
`builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();`
and the result is that Bootstrap' layout "crashes": the footer is no more fixed to the bottom of the page, the header doesn't have the shadow anymore and so on. It follows a screenshot of the crashed page:

### Expected Behavior
This is what the page should look like instead:

### Steps To Reproduce
Just make a brand new ASP.NET Core Web App (MVC) with .NET 6, with both HTTPS and Docker support:

We now have this:

Then install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package (version 6.0.1) from NuGet to the project:

Finally the command AddRazorRuntimeCompilation();

And the result will be:

### Exceptions (if any)
_No response_
### .NET Version
.NET 6.0
### Anything else?
ASP.NET Core 6
Visual Studio Professional 2022
Ask me for anything
Contributor guide
Assessment
This issue has not been assessed yet.