{"id":728,"date":"2010-09-12T14:07:38","date_gmt":"2010-09-12T12:07:38","guid":{"rendered":"http:\/\/www.itidea.nl\/?p=728"},"modified":"2015-09-08T20:35:46","modified_gmt":"2015-09-08T18:35:46","slug":"enable-ecma-com-intellisense-visual-studio-2010","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/enable-ecma-com-intellisense-visual-studio-2010\/","title":{"rendered":"Enable ECMA COM Intellisense Visual Studio 2010"},"content":{"rendered":"<p>While investigating and playing with the dialog framework of SharePoint 2010 I really missed some intellisense of the client object model for the javascript(ECMA) code. It seems real easy to enable intellisense and saves a lot of time!<br \/>\nFirst create a js file in Visual Studio 2010.<br \/>\nAdd the line below as the first line:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\/\/\/ &lt;reference name=&quot;MicrosoftAjax.js&quot; \/&gt;\r\n<\/pre>\n<p>This line of script has to be referenced as the first line, because it has all the default methods for Sys.* available (this js is a Visual Studio file). Also the declaration of the js file which uses the intellisense is dependent of the order in which they appear in the js file. Some of the SP objects depend on this file.<br \/>\nAfter the base reference for Visual Studio add the SharePoint ECMA script files:<\/p>\n<p>\/\/\/ &lt;reference path=&#8221;file:\/\/C:\/Program Files\/Common Files\/Microsoft Shared\/Web Server Extensions\/14\/TEMPLATE\/LAYOUTS\/SP.core.debug.js&#8221; \/&gt;<br \/>\n\/\/\/ &lt;reference path=&#8221;file:\/\/C:\/Program Files\/Common Files\/Microsoft Shared\/Web Server Extensions\/14\/TEMPLATE\/LAYOUTS\/SP.debug.js&#8221; \/&gt;<\/p>\n<p>These two files are the primary files needed for the intellisense.<br \/>\nAfter these references you can add every debug.js file available in the SharePoint root(14) layouts folder you want.<br \/>\nFor example developing the dialog framework add the following reference:<\/p>\n<p>\/\/\/ &lt;reference path=&#8221;file:\/\/C:\/Program Files\/Common Files\/Microsoft Shared\/Web Server Extensions\/14\/TEMPLATE\/LAYOUTS\/SP.UI.Dialog.debug.js&#8221; \/&gt;<\/p>\n<p>And the intellisense showing:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMIntellisense.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-730\" title=\"COMIntellisense\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMIntellisense.png\" alt=\"COMIntellisense\" width=\"598\" height=\"167\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMIntellisense.png 1037w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMIntellisense-300x83.png 300w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMIntellisense-1024x286.png 1024w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>When you add a reference and the intellisense is not updated with the last reference, press Ctrl-Shift-J and you will see the statusbar indicating the intellisense is updating:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMUpdatingIntellisense.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-731\" title=\"COMUpdatingIntellisense\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/09\/COMUpdatingIntellisense.png\" alt=\"COMUpdatingIntellisense\" width=\"168\" height=\"43\" \/><\/a><\/p>\n<p>Please remove the references to the debug.js files while deploying to a production environment.<br \/>\nMore options: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff798328.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/ff798328.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While investigating and playing with the dialog framework of SharePoint 2010 I really missed some intellisense of the client object model for the javascript(ECMA) code. It seems real easy to enable intellisense and saves a lot of time! First create &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/enable-ecma-com-intellisense-visual-studio-2010\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,31],"tags":[42,6],"class_list":["post-728","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010","category-visual-studio","tag-sharepoint-2010","tag-visual-studio"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=728"}],"version-history":[{"count":13,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/728\/revisions"}],"predecessor-version":[{"id":2041,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/728\/revisions\/2041"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}