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
Style sheet not working after upgrade of ASP.NET Core MVC 7.0 application to 8.0 #55383
Comments
Thanks for contacting us. This is most probably due to incorrect / incomplete migration. Hopefully you can identify the issue yourself once you try to build a minimal repro project for us to investigate. if you do so, we'll look into it to see what may have changed. |
Please forgive me to taking so long to respond. In my _Layout.cshtml, I had
which worked fine in .NET 7.0. In .NET 8.0 the following seems to work, at least in development:
I have not yet checked how this affects the effect of edits to the style sheet. |
I have just experimented with a change in the style sheet, in development. The browser uses the previous version of the style sheet. This is, of course, undesirable. |
After I had uploaded the application, the styles did not work. |
@xenophilios thanks for contacting us. Does it work with "in-private" mode? |
Thank you for responding so promptly. Could you please elaborate on your question? I'm not sure what it means. Are you referring to a setting in the browser, in Visual Studio, or in my code? There is, however, some information I could add to what I have supplied so far. In my _Layout view I have the following:
In Program.cs, I have the following (plus a lot of other code before, after, and in-between):
If the instructions in the layout conflict with the instructions in Program.cs, or if either set of instructions is problematic in any way, I would appreciate it if you could let me know. Thank you very much in advance for your trouble, and best regards, |
@xenophilios the |
Dear @mkArtakMSFT , Thank you for your kind response. I have run two tests with Edge in InPrivate mode, both on the development server. If I use The same is true of references to JavaScript files in Razor views. With asp-append-version="true" they are ignored, otherwise they work. I do not have these problems with .NET 7.0; only with 8.0. With best regards, |
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version]
. Could you please tell me what to do to make the stylesheet work again? Thank you for your trouble, and best regards, Eric WeinbergerDear Friends,
I have just tried to upgrade an ASP.NET Core MVC 7.0 application to ASP.NET Core MVC 8.0.
All I have done so far is to change the TargetFramework in the project file from netcoreapp7.0 to netcoreapp8.0 and to update all outdated NuGet packages.
Now my style sheet no longer works. The reference in my Layout file looks like this:
Original Comments
Feedback Bot on 4/14/2024, 06:48 PM:
(private comment, text removed)
Eric Weinberger on 4/15/2024, 02:12 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: