JavaScript IntelliSense for SharePoint 2013 in Visual Studio 2012


Developer Life

Hello reader,

today I’d like to point out nice trick how to enable JavaScript intellisense for your SharePoint 2013 solution in Visual Studio 2012.  We can enable JavaScript in other web project by file “_reference.js” in Scripts folder, but this is an issue in SharePoint 2013 project which can cause troubles when you are use jQuery or KnockOut javascript libraries. The process of adding those is nice and simple. You need it once, as preparation, locate your JavaScript libraries on one place.

Go to Tools in Visual Studio 2012

js2

Then go to Text Editor -> JavaScript -> IntelliSence -> References

js3

By triple dot button to chose your destination of prefered js libraries. Then just go back to your code and try:

JS1

For reference, for all web project (include SharePoint 2013 app model) you can use approach by “_references.js” file like this:

/// <reference path=”jquery-1.8.2.js” />
/// <reference name=”MicrosoftAjax.js” />
///…

View original post 35 more words