Question Details

No question body available.

Tags

asp.net-core-mvc bootstrap-5 intellisense visual-studio-2026

Answers (1)

April 17, 2026 Score: 0 Rep: 249 Quality: Low Completeness: 70%

This isn’t a project/config issue — it’s a limitation of Razor IntelliSense in Visual Studio 2026.

HTML/CSS IntelliSense in .cshtml files does not reliably pick up external CSS (like Bootstrap from wwwroot), especially when it’s referenced via _Layout.cshtml. So even though everything works at runtime, the editor won’t suggest classes.

Things that can help (workarounds):

  • Reference the CSS directly in the same .cshtml file

  • Use bootstrap.css instead of bootstrap.min.css

  • Add a temporary @import inside a block to force indexing

Otherwise, there’s no full fix yet — IntelliSense works properly in .html files, but is inconsistent in Razor views.