Bootstrap Intellisense Missing Visual Studio 2015

12,606

Solution 1

It seems like the solution is to add non-minified Files to your solution in order for intellisense to work. I think it is due to Microsoft splitting out the minifier into a separate extension.

Solution 2

If your project type is an ASP.NET web application and you are using a 'Master page', the easy fix is to add a link to the css file in the master page. For example, in the master page 'head' section I add:

<link rel="stylesheet" href="Content/bootstrap.css" type="text/css" />

Solution 3

ASPX and other WebForm files using the legacy editor do not benefit from this implementation in VS 2013, but may adopt the new system in future releases.

But you can still use this feature as follows:

right click on the default.aspx file in the Solution Explorer open with select HTML Editor ok

Solution 4

In my case, the intellisense not worrk because the path of bootstrap files was changed then files are not included in the project.

After adding files to the project works fine.

I know... It is a simple solution. Sorry!

enter image description here

Solution 5

If someone comes here and the accepted solution doesn’t work.

In my case I had to remove the database project (.sqlproj) from the solution for the Bootstrap css class intellisense to work.

Remove the database project then restart Visual Studio.

And to be clear. This is not a good solution as removing the database project is not what you want. So, hope someone finds a good solution to this weird bug.

Share:
12,606
Shane van Wyk
Author by

Shane van Wyk

C# ASP.Net Software Developer. Specializing in Web Services and System Design.

Updated on July 27, 2022

Comments

  • Shane van Wyk
    Shane van Wyk almost 2 years

    I installed Visual Studio 2015 this week. However I discovered that I have no intellisense in my Razor Views.

    In Visual studio 2013 it worked fine.

    My all my css files are under ~/Content/css/ (*.min.css), including bootstrap.

    Here is the bundle config:

    bundles.Add(new StyleBundle("~/Content/smartadmin").IncludeDirectory("~/Content/css", "*.min.css"));
    

    When I try to use some bootstrap css in my razor view, nothing pops up in the autocomplete box. There should be a purple icon next to the bootstrap classes right..? There are no icons and no css classes listed which is available under the bootstrap package.

    I did a sanity check and created a new MVC 5 application. This comes shipped with bootstrap. This works, all the intellisense is there.

    How do i fix this issue? Surely it must be a problem with my Solution? Does it not like the css files to be under a sub folder under content?

    UPDATE: So i copied in the unminified versions of the files, then it got picked up. So anyone know the reason why VS does not pick up minified files for intellisense?

  • Shane van Wyk
    Shane van Wyk over 8 years
    This is not for ASPX and WebForm files, This is for MVC Razor .cshtml files
  • Shane van Wyk
    Shane van Wyk over 7 years
    That is so strange, I didn't have a database project at all when I was experiencing this issue. Its all gone downhill when they started messing with the minifier
  • Noobie3001
    Noobie3001 over 7 years
    Same thing happened here and removing the database project fixed it. How on earth this happened I don't know. I created the database schema using the import function.
  • JoeCool-Avismón
    JoeCool-Avismón over 7 years
    I can't explain why but, in my case, removing the SQL Server project from the solution also solved the issue. Now I have two instances of VS2015 running. One for the model-persistence-web api and the other for the web angular and mobile app client projects.
  • Taylor Brown
    Taylor Brown over 7 years
    of all the solutions, this is the only one that has ever worked for me.
  • Nick Molyneux
    Nick Molyneux over 7 years
    omg this worked for me. that is super lame. i just hit unload on the database project and the bootstrap intellisense started working. wtf.