Partilhar via


JavaScript Intellisense in Orcas Beta 1

I posted some links recently to enhanced JavaScript support in Orcas but I hadn't had much luck getting it to work myself in the CTP. On Friday I got hold of the Orcas Beta 1 VPC and I've just had the chance to play around with a few things. The first thing I did was to install ASP.NET AJAX on there as it's not there out of the box. Then I brought across an existing ASP.NET AJAX project without any issues. That was easy... :-) Now I was keen to explore the enhanced JavaScript Intellisense that I've been telling people about at recent events...

I now get Intellisense (including method signatures) for my methods and types:

And I get Intellisense for ASP.NET AJAX types and methods whether implicitly or explicitly referenced via the <ScriptManager> tag

I even get this in JS files provided I reference the external JavaScript libraries using an XML comment as below (note, VS automagically adds this comment for you when you create an "AJAX Client Library" JS file):

I can also use XML comments to add additional information for Intellisense - here I've added function summary information, parameter and return type information and descriptions so Intellisense can prompt me with this information when I come to use the method:

The only thing I haven't got working is type inference. Here I was expecting to be prompted with string members:

Wow - that's a great set of features and a *huge* improvement over where we are today... You tend to forget how much you rely on Intellisense (whether or not you agree with Charles Petzold) so living without sensible Intellisense in JavaScript has started to get painful. Roll on Visual Studio Orcas...

Links

Technorati tags: visual studio, orcas, intellisense, javascript

Comments

  • Anonymous
    April 26, 2007
    I don't know. I turn my blogging back for 2 minutes and what happens? We release another raft of important

  • Anonymous
    April 27, 2007
    I see Bertand has posted a detailed description of the XML comments format - very useful. Maybe I'll

  • Anonymous
    May 15, 2007
    Conversely I get type inferencing working just fine, but I can't for the life of me get XML comments to work :o( I'm building a standard HTML Web site (not ASP.NET, and not AJAX at this stage) for a presentation on what's new in Orcas and it's making life  abit difficult to demo XML comments :P

  • Anonymous
    May 21, 2007
    The comment has been removed

  • Anonymous
    May 21, 2007
    I've tried both inline and in an external script file :( I've tried numerous variants from screenshots I've seen around the Web, but none have worked so far. I can't see why, but maybe it's somethign to do with it running in a VPC.

  • Anonymous
    July 26, 2007
    Announced on Soma's blog (and soon to be followed by Silverlight 1.0 RC 1). There are some really compelling

  • Anonymous
    July 26, 2007
    Announced on Soma&#39;s blog (and soon to be followed by Silverlight 1.0 RC 1). There are some really