I am using Visual Studio 2010 / ASP.net MVC 3 with the Razor View Engine. I created a new Project with the Internet Application template. What do I need to do to get Intellisense working?
If that's jQuery specific as the title specifies, trying adding line to the tag in the Views/Shared/_layout.cshtml
(or .vbhtml
) file:
@if (false) { <script src="../../Scripts/jquery-1.4.4-vsdoc.js" type="text/javascript"></script> }
This will reference the intellisense file to VisualStudio and still will not reference it in runtime.
Just remember, point to the vsdoc file relatively to the file you put this code in. Any code like ~
/Url.Content()
or any other runtime code will not be visible to VS for intellisense.
That's exactly why if (false)
hides the script reference from runtime (the if
block isn't executed), but doesn't hide it from VS intellisense (and provide another reference using Url.Content()
or so to the .min.js file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With