Microsoft.WinJS missing? RRS feed

  • Question

  • When upgrading your WinJS project from Consumer Preview to Release Preview you will notice when you open it, that the WinJS reference has a warning like this:

    You need to remove this reference since it is pointing to the old WinJS 0.6 and reference the RP version by right clicking on it and choosing Remove.

    Right click on References (above) and add the Windows Library for JavaScript 1.0 RC SDK by checking it and hitting OK.

    Then you can drag and drop the 1.0 libraries into your HTML files and remove the 0.6 libraries or simply global search and replace the old with the new:

    <!-- OLD WinJS references - Delete these!

    <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> --> <!-- New WinJS references - Add these! --> <link rel="stylesheet" type="text/css" href="//Microsoft.WinJS.1.0.RC/css/ui-dark.css" /> <script type="text/javascript" src="//Microsoft.WinJS.1.0.RC/js/base.js"></script> <script type="text/javascript" src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>

    Note: In the code above I simply dragged the libraries in from the References... It is much more effecient to do a global replace on //Microsoft.WinJS.0.6 with //Microsoft.WinJS.1.0.RC after adding the new reference.  Also see the Migration Guide at the top of the forum!


    Jeff Sanders (MSFT)

    Friday, June 1, 2012 1:06 PM

All replies

  • That is exactly what was wrong, phew, did not have to re-install VS.
    Friday, June 8, 2012 3:25 PM
  • still does not work for me, the intellisense does not show WinJS. But when i tried to debug it, it's there, i don't know. Bug maybe.
    Monday, June 18, 2012 2:04 PM
  • Hi Raymond,

    Did you do a clean build of your project?  If not it may have not updated the intellisense database.


    Jeff Sanders (MSFT)

    Monday, June 18, 2012 2:10 PM
  • I swear i don't know how it happened. But somehow WinJS is now showing on intellisense. Somehow the bug disappeared by itself. I swear i am not lying, this whole day the WinJS does not appear on intellisense, and i had to test program without intellisense, the Windows does show though. But somehow NOW the WinJS appear on intellisense and i can now program more easily (and more fun). This is a very weird bug (i think it's a bug, i don't know).

    Monday, June 18, 2012 2:23 PM
  • have u tried to add explicit reference?

    E.g. FileA.js uses OBJ defined in FileB.js.

    You could drap FileB into FileA, you will see something like

    /// <reference path="../js/default.js" />

    appearing at the top of fileA.js.or you can just type this out yourself

    • Edited by shsh640 Monday, July 2, 2012 10:51 PM
    Monday, July 2, 2012 10:50 PM
  • thanks.
    Thursday, September 20, 2012 4:28 PM