How to fix visual studio does not see files bootstrap?

Logic_Gun 5 Reputation points
2023-08-03T16:16:15.5466667+00:00

bootstrap is imported using nuget packages. cannot specify the path to the file (visual studio does not see it) https://imgur.com/a/3LuWDiB

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | Visual Studio | Other
{count} vote

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2023-08-04T03:23:03.79+00:00

    Hello @Logic_Gun ,

    Welcome to Microsoft Q&A forum.

    In short, the files are not there, in wwwroot\css folder. They are stored in nuget package's folder, so VS failed to find them under wwwroot\css.

    As you mentioned, bootstrap is imported using nuget packages, from the screenshot that you shared, the imported .css files are more like linked/referenced, which means they don’t exist in the css folder, but they are saved in the nuget package’s folder.

    When you wrote href="", IntelliSense shows the existing .css files in css folder under wwwroot folder, so bootstrap.css and those files imported by using nuget package "disappear".

    If you try to use the correct directory/path or put them into the wwwroot\css folder, then VS should find/see them. The directory should be like => C:\Users\username\.nuget\packages\the specific nuget package\...\bootstrap.css. You can check the path by selecting bootstrap.css, checking in VS Properties window => Misc => Full Path.

    Have a great day.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.