开发者

How to enable Jscript intellisense (VS2010) in class library project

开发者 https://www.devze.com 2023-04-07 05:16 出处:网络
I have a normal class library project that will provide some custom web controls for usage in other (normal ASP.NET Web form) projects.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号