How do I get JavaScript Intellisense from vsdoc file references in WebMatrix 2 Beta? - webmatrix

I copied a JavaScript file over from Visual Studio to a new WebMatrix 2 Beta project only to find out the vsdoc file wasn't being used for JavaScript Intellisense.
/// <reference path="jquery-1.6.4-vsdoc.js" />
JavaScript's core functions do show up in Intellisense, but it doesn't appear to pull additional data from vsdoc files.
Spoiler alert: I will be answering this myself to bring the answer from its current webmatrix.uservoice.com location to StackOverflow for anyone else with this issue. Please don't take offense to this.

Since they are currently taking user input on desired features in WebMatrix 2 Beta, I pitched support for vsdoc JavaScript file references. The WebMatrix team responded that it was already supported but the syntax was different until they change it to be more consistent with the current Visual Studio syntax. It is only different by one word.
Works in WebMatrix 2 Beta (note "file" instead of "path")
/// <reference file="jquery-1.6.4-vsdoc.js" />
Note:
While the "path" syntax doesn't work in WebMatrix 2 Beta yet, the WebMatrix team seemed intent on supporting it going forward for consistency with Visual Studio. If, for some reason, someone is using the same *vsdoc.js file between a WebMatrix 2 Beta project and a Visual Studio project (or managing a a WebMatrix user's project in Visual Studio), you could simply cover both bases. The WebMatrix "file" syntax does not appear to be supported by Visual Studio 2010.
/// <reference path="jquery-1.6.4-vsdoc.js" />
/// <reference file="jquery-1.6.4-vsdoc.js" />
Additional Note:
WebMatrix 2 Beta does not appear to support the new paragraph-sectioned (<para>) vsdoc files.

Related

Visual Studio JavaScript Intellisense for Dynamics CRM 2015

Remember back in CRM 2011 days, there is this XrmPageTemplate.js file from CRM SDK? Visual Studio will give you nice JavaScript intellisense if you refer to this file from your JavaScript. My question is how do you do the same for CRM 2015? Thanks.
On GitHub you can find the Definitely Typed project containing TypeScript definition files, among which those for Dynamics CRM.
Add the definition file to your web project and name it, say, "Xrm.intellisense.ts". Reference it in your Javascript file by adding the following line at the top of the page. (You will probably need to adjust the path.)
/// <reference path="/Scripts/References/XrmPage.intellisense.ts"/>
Intellisense will work great with Resharper.

Missing razor intellisense and keyboard shortcut behavior in MVC 5 - visual studio 2012 with Resharper

I have started an MVC 5 empty project and imported most of my stuff from another project to this one using most of this link. However I soon found out that I was having other kinds of troubles. I have since then downloaded ASP.NET and Web Tools 2013.1 for Visual Studio 2012 and installed it, and it only solved my problem partially.
As of right now my Razor syntax works, but I lost some really nice functionalities. Here's an example:
<li>
Orders
</li>
Today's date: #System.DateTime.Now
So when I type the #System.DateTime.Now line, the intellisence does work and offers the good options. However, if I type the Orders, as of before when writing the SearchOrders line the intellisence would provide the names of the actions included in the controller, however with MVC 5 and Visual Studio 2012 it is no more the case.
So if I type a missing action the support will not anymore warn me that the action is missing, nor will it offer me to create the action in my controller, and so on. In the same way, if I hit F12 on a View() line, Visual Studio 2012 will open the metadata class instead of showing the .cshtml file.
Is there something missing to gain back those functionalities? I've tried with an MVC 4 Web Application framework and things were working fine.
EDIT after user Erik pointed out that it was related to Resharper's code completion and other features, I am now searching as to why Resharper v 7.1.x does not seem to be able to deal with MVC 5 and its features.
As Erik Funkenbush (see comments on my main post) mentioned, the data lacking was actually part of Resharper's behavior and was not related, as I thought, to Visual Studio.
The main question was why Resharper 7.1.x did not seem to be able to cope with MVC 5 - Razor 3. I have not found the answer to that question, but I have installed Resharper 8 and all those lost functionality are back.
So if you ever stumble upon this problem, try an updated version of Resharper, it might be your solution.

ExtJS in Visual Studio (2010)

Two questions:
How can I get JavaScript IntelliSense for ExtJS?
Are there any good tools (e.g. Extensions, NuGet packages) for working with ExtJS in Visual Studio?
Are there any good tools (e.g. Add-on Extensions like FireBug) for working with ExtJS in Firefox?
To use intellisense in VS 2010 you need to reffer which files should be loaded for intelli sense. You can archive this with references in the docs where you want to use intelli sense:
/// <reference path="ScriptFile1.js" />
/// <reference path="Scripts/ScriptFile2.js" />
/// <reference path="../ScriptFile3.js" />
/// <reference path="~/Scripts/ScriptFile4.js" />
for more information on intellisense take a look at the MSDN
For the tools part;
Edit
To Update on highlighting, braces, aso :
Javascript tools is a great package directly by Microsoft
editend
Javasript Parser does a great work for me when writing
For testing & Debugging Firebug is the best you get in my opinion, but you can also use the IE developer tools(install only required for older IE, prior 8 if I am not mistaking) for debugging.
I have found these extensions useful when working with ExtJS in Visual Studio:
Javascript Parser - makes it easy to find functions, shows todo comments
JSLint.VS2010 - code analysis, helps avoid coding mistakes
try this http://www.dxdframework.com/, it's ext 3 integrated with msvs2010, examples are still for msvs2008, but as i know documentation will be updated soon. wiki: http://wiki.dxdframework.com/AllPages.aspx
To answer point #2, I highly recommend Ext.Net for working with ExtJS in Visual Studio, assuming you are using ASP.NET.
Best resources for wiring up IntelliSense for EXTJS in VS 2010+ is here:
http://gurustop.net/blog/2012/03/03/javascript-js-intellisense-auto_complete-in-visual-studio-11-beta-the-web-_references-js-file/
Note the "Updated" comment at the bottom:
"...you can add files to the global JavaScript intellisense from the Visual Studio Tools –> Options Dialog."
This worked for me after I added "ext-all-debug-w-comments.js" to the list and turned off Resharper's IntelliSense for JS files only.

Can ReSharper properly parse SharePoint layouts?

I am creating a SharePoint 2010 feature in Visual Studio 2010.
While ReSharper is a valuable tool for writing code, it reports lots of errors (all server-relative image references, master page reference, ContentPlaceHolderID's referring to the master page and so on) in .aspx layout definitions. I had to exclude the master page from ReSharper completely, as it was hanging the VS process - however, the errors were reported before as well.
Is there a 'clever' way of configuring it to correctly parse those files?
As mentioned earlier, R# has offers no support for SharePoint Application- and MasterPages. The issue is because SharePoint is using an other approach to reference assembies and because of the SharePoint specific implementation of the ASP.NET virtual path provider. So R# isn't able to locate all the required dependencies which are required to render an entire SharePoint site.
JetBrains will have to reproduce the SharePoint Designer behavior.
Thorsten
ReSharper 7 (still in beta) supports SharePoint now. ReSharper 7 understands SharePoint-specific master pages, resources, style sheets and JavaScript files.

Is it possible to add HTML5 validation to Visual Studio?

I'm working on a page using <canvas>, which is a HTML5 tag, in Visual Web Developer Express Edition 2008, and the validator in the HTML editor is telling me it's an invalid tag. That's because it's set to validate against XHTML 1.0 Transitional. I'd prefer for it to not do that and tell me what's valid or invalid based on the HTML5 doctype, but I can't find anywhere in the preferences that suggests this would be possible.
Is there a way to tell Visual Studio to validate against HTML5, or add a new spec reference manually? I'd prefer not to have to go in and add tags manually, which appears to be the only option at the moment.
It looks like the Visual Web Developer team solved the problem by adding HTML5 support themselves:
http://blogs.msdn.com/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx
You all probably know that new HTML 5 standard is coming. We made a new intellisense schema that you can add to VS 2008 or VWD Express 2008 and get intellisense and validation on HTML 5 elements.
For Visual Studio 2010 you'll want to install the Web Standards Update for Visual Studio 2010 SP1:
It updates the HTML5 intellisense and validation to reflect the latest
W3C specifications and fixes some bugs bugs in the current SP1 support
for HTML5. Also JavaScript intellisense it updated to reflect many of
the new browser capabilities such as Geolocation and DOM storage.
Finally, this update adds comprehensive CSS3 intellisense and
validation based on the latest specifications from W3C.
For Visual Studio 2008, Microsoft has provided an updated version of the HTML 5 validation schema and intellisense in the Visual Studio Gallery.
HTML 5 Intellisense
The updated schema was posted by Mikhail Arkhipov, the same Microsoft employee who wrote the blog post linked in Rahul's answer.
I created a validation schema that you're free to use:
http://johndyer.name/post/2009/07/21/HTML5-XHTML5-Validation-Schema-for-Visual-Studio-2008.aspx
This is now included in Visual Studio 2010 SP1
You can define your own validation standards.
You need to add the file to the folder in VS install, and add to the registry.
This is the description I used (HTML and CSS have a very similar approach): http://blogs.msdn.com/mikhailarkhipov/archive/2007/10/19/how-to-create-custom-css-intellisense-schema-in-visual-studio-2005-and-2008.aspx

Resources