1

I have a web MVC app that uses jQuery and quite a lot of other Javascript. All in there are over 20 .js files that are joined and minified in the production app.

We have a mix of brought in frameworks (like jQuery) and our own Javascript.

So that these files have intellisense we have a common vsdoc.js file:

/// <reference path="/content/js/frameworks/jquery-..-vsdoc.js" />
/// <reference path="/content/js/frameworks/framework1.js" />
...
/// <reference path="/content/js/frameworks/framework9.js" />
$j = jQuery.noConflict();

Then at the top of each of our own .js files we have:

/// <reference path="/content/js/vsdoc.js" />

Which means that all of the Javascript we're writing gets intellisense for all of our frameworks.

The problem is in .aspx MVC views. We want to get intellisense for all our Javascript when coding in the views, so we have a vsdoc-page.js file:

/// <reference path="/content/js/vsdoc.js" />
/// <reference path="/content/js/file1.js" />
...
/// <reference path="/content/js/file9.js" />

Then we reference that in the <head> of all of our .master pages:

<% if (false) { %>
    <script src="/content/js/vsdoc-page.js" type="text/javascript"></script>
<% } %>

However that doesn't seem to work at all. Anything we XML document in vsdoc-page.js works, but the references within that aren't followed up on.

Is there something I'm doing wrong? Is there some way to get VS to follow the reference path in a .aspx page in the same way that it does in a .js file?

Keith
  • 150,284
  • 78
  • 298
  • 434
  • Try this http://stackoverflow.com/questions/11488208/intellisense-doesnt-work-for-js-in-vs2012/12628049#12628049 – DRobertE Oct 15 '12 at 12:12

0 Answers0