locked
Visual Studio 2013 RC LightSwitch missing js files??? RRS feed

  • Question

  • Does anyone know why this should appear in my Output Window as Output from: "JavaScript Language Service"?

    09:28:03.5301: Referenced file '~/Scripts/_references.js' not found.
    09:28:03.5401: Referenced file 'globalize.js' not found.

    I just open Screen.lsml.js & there it is. I prefer that referenced files are actually found but the web-app Builds and deploys OK so why the messages I wonder.



    Z A R D O Z

    Tuesday, September 24, 2013 10:28 AM

All replies

  • Hi,

    If we get '.js' file not found error,  generally we add references to the same .js files that exist in the list but pointing to the new path where you have VS installed,

     "referenced files are actually found but the web-app Builds and deploys OK "

    I'm also not sure about this situation.

    Regards


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Angie Xu Thursday, September 26, 2013 7:28 AM
    Thursday, September 26, 2013 7:26 AM
  • Thx Angie.

    Not sure what you mean by: "...we add references to the same .js files that exist in the list but pointing to the new path where you have VS installed, ...". What list are you talking about? Files in the Scripts folder?

    I've searched for '_references.js' and 'globalize.js' in my project files, which are located in SkyDrive, and can't find them.. I've looked in the default install location in UserName\My Documents\Visual Studio 2013 and can't find them there either.

    If I just open a project and click on HTMLClient the msgs appear:

    09:28:03.5301: Referenced file '~/Scripts/_references.js' not found.
    09:28:03.5401: Referenced file 'globalize.js' not found.

    I found a downloaded sample project that didn't have the error but I can't spot any significant difference between that and the projects that do show these msgs.


    Z A R D O Z

    Thursday, September 26, 2013 10:24 AM
  • Any resolution to this?  I'm getting the same errors.  I fixed the _references one by adding that file, then pointing it to the jquery file, but not sure about globalize.js.  

    Can't get intellisense to work in the html client.  Not sure if this has anything to do with it, but just trying to clean it all up.

    Thursday, October 31, 2013 2:16 AM
  • No sorry I can't help. I've tried a few things but have not resolved this issue. The missing files msgs started with the VSLS2013 Pro RC and it's the same now that I've uninstalled that & reinstalled the MSDN released version.

    I've been running on Win 7 Ult 64-bit but I'll be rebuilding a Win 8.1 Pro Notebook soon and installing VS2013 on that. Maybe a fresh install will sort the problem. I'm had random unrepeatable messages about missing Azure related files during Rebuilds. The app still plays OK though! It just seems like this thing just ain't hooked up right for some reason.


    Z A R D O Z

    Thursday, October 31, 2013 10:38 PM
  • I did find that globalize.js issue.  The componentone extensions are looking for globalize.js instead of globalize.min.js.  Globalize.min.js is defined in the default.html file.  Make sure all three of these lines are in default.htm:

     <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
        <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
        <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.js"></script>

    Friday, November 1, 2013 6:25 PM
  • Thanks Eric. As you suggested I was missing the last line. After I added the extra line I got Output of:

    05:32:46.8638: Referenced file '~/Scripts/_references.js' not found.
    05:32:47.4098: Downloading referenced file '//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js'...
    05:32:47.5970: Downloading referenced file '//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js'...
    05:32:47.5970: Downloading referenced file '//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.js'...
    05:32:47.6906: Referenced file 'Scripts/Generated/resources.js' not found.
    05:32:47.7686: Referenced file 'globalize.js' not found.
    05:32:47.7842: Referenced file 'Scripts/Generated/generatedAssets.js' not found.
    05:32:55.1318: '//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js' download completed.
    05:32:55.6466: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\JavaScript\References\libhelp.js' not found within 500 ms.
    05:32:56.1614: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\JavaScript\References\sitetypesWeb.js' not found within 500 ms.
    05:32:59.1878: '//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js' download completed.
    05:33:00.1082: '//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.js' download completed.

    So I guess the globalize is sorted???

    Referenced file '~/Scripts/_references.js' not found. - still an issue.

    Referenced file 'Scripts/Generated/resources.js' not found." - also missing apparently.

    Overall I'm still not really winning with this stuff :-(


    Z A R D O Z

    Saturday, November 2, 2013 10:19 AM
  • ~/Scripts/_references.js'

    I fixed that by creating a _references.js file in the Scripts folder that contains this line:

    /// <reference path="~\scripts\jquery-1.9.1.js" />

    A hack?  Yes.  But I found it on the Internet, so it must be true.

    The "Referenced file 'Scripts/Generated/resources.js'" error mysteriously went away for me after fixing the _references file and linking to the online file referenced above.  I don't understand it though, because resourses.js is clearly in the GeneratedArtifacts folder, which is not in the Scripts folder at all!

    scripttype="text/javascript"src="Scripts/Generated/resources.js"></scripts>

    Beats me, but my intellisense doesn't work in my .js files either, which is a real bummer!

    Eric

    Sunday, November 3, 2013 3:34 AM
  • If you create a LightSwitch 2013 HTMl project and then look in default.htm you will find a series of js references that can't be resolved right from the get go.

     <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>

    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>

    <script type="text/javascript" src="Scripts/Generated/resources.js"></script>

    <script type="text/javascript" src="Scripts/Generated/generatedAssets.js"></script>

    VS2012 is fine but they are different references so that doesn't help.

    I am only just starting out with lightswitch and I am staying in VS2012 until things settle down.


    bob_clegg

    Wednesday, January 8, 2014 10:55 PM