The Wayback Machine - https://web.archive.org/web/20220208145705/https://github.com/dotnet/aspnetcore/issues/40066
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation bug with AddRazorRuntimeCompilation() to an ASP.NET Core Web App (MVC) project #40066

Open
1 task done
RobertoFalconi opened this issue Feb 8, 2022 · 0 comments

Comments

@RobertoFalconi
Copy link

@RobertoFalconi RobertoFalconi commented Feb 8, 2022

Is there an existing issue for this?

  • 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 from NuGet, then I have in the Program.cs

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();

and the layout of Bootstrap "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:

Cattura 2

Expected Behavior

This is what the page should look like instead:

Cattura

Steps To Reproduce

Just made a brand new ASP.NET Core Web App (MVC) with .NET 6, without controllers (minal API) and OpenAPI support

Cattura3

We now have this:

Cattura

Then add the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package from NuGet to the project

Cattura4

Finally the command AddRazorRuntimeCompilation();

Cattura5

And the result will be:

Cattura 2

Exceptions (if any)

No response

.NET Version

.NET 6.0

Anything else?

ASP.NET Core 6
Visual Studio Professional 2022

Ask me for anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant