Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Visual Studio 2022 - v.17.6.5 - link installed nuget package css file in _Layout.cshtml

$
0
0

I created a new .net 6.0 MVC Web project and removed the preinstalled bootstrap from wwwroot/lib because I wanted to add it with NuGet Package Manager. After installing the package, files are shown as a reference in my wwwroot, and when I try to link them from code browser gives not found error cause they don't actually exists in my project.

Now I'm trying this: <link rel="stylesheet" href="~/css/bootstrap.min.css" /> but as I said is not working. The only solution I've got is to copy those file from C\..nuget\packages to my wwwroot but I've read that this reference is actually an intended behaviour from Microsoft, so it should be a way to use those referenced files but I can't seem to find it.

How should I reference those files in my code to be able to use them?

enter image description here


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>