Stylesheets
<link rel="stylesheet" href="~/ProjectName.style.css" asp-append-version="true" />
Hello, there, can someone please explain me what this link is refering to. I used search across my whole project and there is no file with such name. I even checked for hiden files. Also when I launch an app and inspect a page on Chrome it will show me that this file was loaded and will show its contents(some css obv).
It comes by default with MVC template in _Layout.cshtml
file4 Replies
~/
refers to the wwwroot
directory
ProjectName.style.css
is probably automatically compiled from scoped CSS stylesheets
So it doesn't physically exist in your project, it's generated during buildYeah, but can I see it somewhere? Because if I change file name in the link, browser will give me 404 file not found
So like for example, if I want to change resulting file's name, can I do it somewhere?
might be able to change it via <PackageId> in the project file https://learn.microsoft.com/en-us/aspnet/core/mvc/views/overview?view=aspnetcore-9.0#css-isolation
Views in ASP.NET Core MVC
Learn how views handle the app's data presentation and user interaction in ASP.NET Core MVC.
This is very helpful! Thanks a lot!