Reputation: 27338
I have installed boostrap.scss nuget package into ASP.NET Core 3.1 project, but I don't see the SCSS files. Where are they?
Upvotes: 3
Views: 2291
Reputation: 28126
I have installed boostrap.scss nuget package into ASP.NET Core 3.1 project, but I don't see the SCSS files.
Agree with zivkan, to make generated packages compatible with asp .net core projects (which uses PackageReference
format), package authors should use contentFiles
element instead of old content
element when creating packages.
If the package is created using ContentFiles element + those scss files, when you consume that package in your current .net core project, you can then see those files in solution explorer. But after my check, boostrap.sass
doesn't use contentfiles element in xx.nuspec
file. That's why you can't see those files in solution explorer. And this is something that should be handled by package authors, we consumers can do nothing about that...
Where are they?
One nuget package(xx.nupkg) is actually a zip file. You can download it manually here
Rename it to xx.zip
, extract it and then you can find those files in:
Also, since you've installed that package into current project, you can find those files in cache C:\Users\xxx\.nuget\packages\bootstrap.sass\x.x.x\contentFiles\Content\bootstrap
.
In summary:
The author do include those files in the contentFiles
folder when generating nuget packages. However, he also need to specify the contentFiles
element in xx.nuspec
file like this issue. Only one folder whose name is contentFiles
in xx.nupkg is not enough if we want to access those files in VS Solution Explorer. You may need to contact the author to get further support.
Upvotes: 1
Reputation: 1470
I am the maintainer of the Bootstrap NuGet packages. While I don't think you should be using NuGet for Bootstrap in dot net core projects, I think I've figured out how to make it work.
I am going to place the js files in the wwwroot/js and, for the non-scss Bootstrap package, css files in the wwwroot/css folder. Where do you expect the scss files to be? wwwroot/scss? /scss? Somewhere else?
Let me know and I'll publish a new version ASAP.
Upvotes: 2