VS2012 MVC 4 Intellisense for CSS classes in partial views not working
PROBLEM:
I have a master page that has CSS embedded and I am trying to access CSS classes via VS2012 intellisense on my partial views.
RESEARCH AND SOLUTIONS:
I have spent many hours trying to solve this problem and have noted a number of other stackoverflow posts regarding this issue:
Viewing CSS Intellisense in Partial Views and Content Pages - Visual Studio 2010?
Why doesn't Visual Studio resolve CSS class names?
someone also posted a video which had the EXACT problem I was facing: http://www.youtube.com/watch?v=1bp1TxswSHQ
Suggested solutions is to use relative path using @if (false) {... trick on the partial view page:
@if (false) {
<link type="text/css" rel="Stylesheet" href="../../content/css/styles.css"/>
}
OR to use the following on a partial image:
<link rel="stylesheet" runat="server" media="screen" href="~/content/css/styles.css" />
None of them seem to work for me.
I am using VS 2012 Express.
Any ideas?
+3
source to share