locked
WinJS missing in my Intellisense combo

    Question

  • This one is giving me a hard time. I'm obviously not too familiar with WinJS yet so intellisense is (was) a great help.

    For some reason it's been missing since a couple of days :(

    Is there anything I can do to bring it back?


    http://bit.ly/sebagomez

    Friday, August 24, 2012 4:24 PM

Answers

  • You could try referencing the WinJS files directly in your project.  Either expand the reference node until you find base.js and ui.js and drag those files onto the current file or paste these references at the top of the file without WinJS:

    /// <reference path="//Microsoft.WinJS.1.0/js/base.js" />

    /// <reference path="//Microsoft.WinJS.1.0/js/ui.js" />

    Without more information it’s hard to tell what will bring WinJS back.  If it does not fix the issue it would be helpful to know if WinJS is not showing in specific files, an entire project, or new projects.  It would also be helpful to know how you are referencing the file that has the issue (i.e do you have something like this in an html file? <script src="//Microsoft.WinJS.1.0/js/base.js"></script><script src="//Microsoft.WinJS.1.0/js/ui.js"></script><script src="<your file here>.js"></script>).


    This posting is provided "as is" with no warranties, and confers no rights.

    Friday, August 24, 2012 5:52 PM

All replies

  • You could try referencing the WinJS files directly in your project.  Either expand the reference node until you find base.js and ui.js and drag those files onto the current file or paste these references at the top of the file without WinJS:

    /// <reference path="//Microsoft.WinJS.1.0/js/base.js" />

    /// <reference path="//Microsoft.WinJS.1.0/js/ui.js" />

    Without more information it’s hard to tell what will bring WinJS back.  If it does not fix the issue it would be helpful to know if WinJS is not showing in specific files, an entire project, or new projects.  It would also be helpful to know how you are referencing the file that has the issue (i.e do you have something like this in an html file? <script src="//Microsoft.WinJS.1.0/js/base.js"></script><script src="//Microsoft.WinJS.1.0/js/ui.js"></script><script src="<your file here>.js"></script>).


    This posting is provided "as is" with no warranties, and confers no rights.

    Friday, August 24, 2012 5:52 PM
  • Fair enough, but is there a reason why it's not working without the explicit reference? It seems the files that come with the template work without the reference, whereas files added thereafter don't and hence require the explicit reference
    Saturday, October 20, 2012 6:26 PM
  • I believe the templates reference the files from the html:

    <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
    <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
    <script src="<template file here>.js"></script>

    So they should have a script reference to get IntelliSense.  I believe the way navigation works does not require the new files be added to the html file, which will work when run, but it won't give IntelliSense. 

    In order to get IntelliSense either in the html or through the reference comment there needs to be an order for files the current file needs for better IntelliSense.


    This posting is provided "as is" with no warranties, and confers no rights.

    Monday, October 22, 2012 5:43 PM