css, js and img files can not be found in asp.net 5 mvc -


i'm trying explore visual studio 2015 , asp.net-5 mvc-6.

project directory structure-

enter image description here

razor view html

<!doctype html> <html>    <head>       <link href="~/assets/css/bootstrap.min.css" rel="stylesheet">           ... ... ...    </head>    <body>      ... ... ...    </body> </html> 

browser finds no asset files. screenshot-

enter image description here

what i'm missing here?

your assets folder should moved under wwwroot.

in asp.net 5 static files go under wwwroot. can use grunt or gulp pre-process files project , place them here.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -