Search code examples
javascriptvisual-studiopluginsreferenceweb-essentials

Go to definition in web essentials


I was trying to understand web essential's Go To Definition feature statement:

Go To Definition is built in to VS2012 and VS2013. This feature makes the feature work with /// <reference> constructs

  • If the feature is built in with VS what different this feature is doing?
  • What is the reference construct in javascript?

According to this, VS on itself can provide intellisense for outside .js files with the help of Reference Directives, so what is the difference?


Solution

  • VS Go To Definition by itself works within javascript files, not across a reference to another file (supposedly). Web essentials extends this functionality.

    The reference construct is documented, for example, here: http://msdn.microsoft.com/library/bb385682.aspx#ReferenceDirectives

    As per madskristensen's comment

    This is not for providing Intellisense, since VS supports that natively. It's for hitting F12 to Go to definition on one of those comments