Intellisense doesn't work for JavaScript in Visual Studio 2012

后端 未结 8 1526
我在风中等你
我在风中等你 2020-11-28 01:02

I have a clean, out-of-the-box installation of Visual Studio 2012 Web Developer Express and for some reason the support for JavaScript (both jQuery, jQuery UI and

8条回答
  •  一向
    一向 (楼主)
    2020-11-28 01:34

    Go to menu Tools -> Options -> Text Editor -> JavaScript -> Intellisense -> References and place a reference to the intellisense files for the version of jQuery you are using in the Implicit Web group.

    Enter image description here

    OR

    place an "add reference" to the intellisense file in the _references.js file which you can add to the Scripts folder of your project.

    /// 
    /// 
    /// 
    

    Though this will only provide intellisense for the project you are in, the first will for any open JavaScript file, not just the ones in the project you are in.

    To get the latest jQuery files with intellisense use the NuGet package installer which by default will create a scripts folder and place the jQuery version.js, the min.js and intellisense.js files into... From there you can copy them to the location most of the Microsoft references are placed in, which is typically:

    install-package jquery in the package manager console.

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References

提交回复
热议问题