Jeff King查看这篇文章是关于让Visual Studio能够通过intellisense找到javascript文件:JScript IntelliSense FAQ。
特别是阅读点#4,第三个项目符号:
Site-Relative Paths - These are paths
of the form "/folder/file", and is
calculated from the base of your site
(http://site/application/folder/file).
This approach is supported by ASP.NET
Web Forms and ASP.NET MVC. However,
it is not supported by Visual Studio.
The reason is because Visual Studio
does not always know the final
deployed location of your site and
thus the path resolution cannot be
guaranteed. Given that quite we've
seen few folks are using site-relative
paths, we could consider making an
assumption just resolving this type of
path to the root of the project.
Given the risk that you may think your
site is working when it's really not,
I wanted to see how many people were
supportive of this.
注意“Visual Studio不支持”[站点相对路径]“。我总是使用网站相对路径为我的JavaScript和CSS文件,所以解决方案让Visual Studio找到您的JavaScript文件是相同的解决方案,让Visual Studio找到您的CSS文件:
现在Visual Studio可以找到CSS文件并验证我的CSS类名是否存在(并且Design View看起来好得多)。
在我的博客上发布:
Why does Visual Studio not resolve my CSS class names?
-Jeff