I have a normal class library project that will provide some custom web controls for usage in other (normal ASP.NET Web form) projects.
Those controls will have java script files and I want to use Intellisense in there - especially for the MS Ajax library.
My class library project references System.Web.Extensions
, and I added a new JScript file to a Resources\Scripts folder in my project and set it to embedded resource (to be able to reference it from my control and deliver it). So in this script I tried this in the very first line:
/// <reference name="MicrosoftAjax.js" />
But no JScript Intellisense is available (i.e. the Sys
and Type
global objects are not available in Intellisense).
I also tried this:
/// <reference name="MicrosoftAjax.debug.js" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
but this has the same (negative) results. I also discovered the same behavior when adding a JScript file开发者_如何学运维 to a normal web project - also here is no Intellisense available.
So the question is: How can I activate intellisense for the MS Ajax library in my script files?
Additionally: From the web projects (that will only reference my compiled cotnrol assembly, NOT the assembly project with its source), how can I add Intellisense support for the files defined there? The reference with name and assembly seems not to work too.
You have to give a path and not just a filename unless the file actually lives in the same folder. also, many files have separate code and vsdoc, try to look for a -vsdoc.js file and reference that.
精彩评论