Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use a CDN and still have Intellisense support in Visual Studio. There are two ways to do this:</p> <ol> <li><p>Add an Intellisense reference to the <code>*vsdoc.js</code> file that is hosted on the CDN. Go to <code>Tools | Options</code>:</p> <p><img src="https://i.stack.imgur.com/Bu9f8.png" alt="Options dialog"></p> <p>Note that you will need to make an entry for <em>each</em> <code>*vsdoc.js</code> that you want to use.</p></li> <li>If you know that the <code>*vsdoc.js</code> file is co-located in the same directory with the <code>js</code> file on the CDN (like it is on the ASP.NET CDN), <em>AND</em> you're using MVC, you can just update your <code>_references.js</code> file to reflect this:</li> </ol> <p><code>/// &lt;reference path="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.0.js" /&gt;</code></p> <p>If you need help with _references.js, see my blog entry <a href="http://windowshell.wordpress.com/2013/06/20/javascript-intellisense-in-visual-studio-2012/" rel="nofollow noreferrer">here</a>.</p> <p>Be sure to update your webpage (or _Layout.cshtml) reference to actually use the CDN too. Note that the <code>js</code> path that you use for your web pages doesn't have to be the same as your Intellisense reference (of course, you obviously want them to be the same version)!</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;@ViewBag.Title&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="body"&gt; @RenderBody() &lt;/div&gt; &lt;script src="@Url.Content("http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js")" type="text/javascript"&gt;&lt;/script&gt; @RenderSection("scripts") &lt;/body&gt; &lt;/html&gt; </code></pre> <p>NOTE: The examples above assume that you're not using ASP.NET 4.5 bundling, or taking advantage of CDN features such as path mirroring and reverse proxies. I assume that if you're using these features, you know what needs to be done to get them running.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload