admin管理员组文章数量:1024016
I have a third party JavaScript plug-in but including the file breaks IntelliSense for jQuery amongst other things. The only way I can get IntelliSense back working with jQuery is by menting out the plug-in. Is there a way I can hide the plug-in file from the IntelliSense parser?
I have a third party JavaScript plug-in but including the file breaks IntelliSense for jQuery amongst other things. The only way I can get IntelliSense back working with jQuery is by menting out the plug-in. Is there a way I can hide the plug-in file from the IntelliSense parser?
Share Improve this question edited Dec 14, 2009 at 20:28 Peter Mortensen 31.6k22 gold badges110 silver badges133 bronze badges asked Nov 12, 2008 at 21:50 fleshflesh 23.9k24 gold badges82 silver badges98 bronze badges4 Answers
Reset to default 9Service Pack 1 added the following feature:
If you "anyfile.js" and "anyfile-vsdoc.js" in the same directory, then any references to "anyfile.js" will automagically be converted to a reference to "anyfile-vsdoc.js" behind the scenes.
Add an empty file next to your plugin with "-vsdoc" appended to the filename. That should "hide" the plug-in from the external javascript processor.
You could always load it from your code-behind instead of the scriptmanager in your aspx/master. That way the IntelliSense doesn't know it's there. Using ScriptManager.RegisterClientScriptInclude(..).
It could be that third party JavaScript plugin you're using has some errors in it.
I would check the code in JSLint and directed this question to the author of the plugin.
As for the question itself: I don't think you can exclude it if it's a part of the project, but go over the MSDN: Using IntelliSense to prove it.
Since you mentioned jQuery, you could also load the troublesome script during runtime.
$.getScript("XXX.js");
I have a third party JavaScript plug-in but including the file breaks IntelliSense for jQuery amongst other things. The only way I can get IntelliSense back working with jQuery is by menting out the plug-in. Is there a way I can hide the plug-in file from the IntelliSense parser?
I have a third party JavaScript plug-in but including the file breaks IntelliSense for jQuery amongst other things. The only way I can get IntelliSense back working with jQuery is by menting out the plug-in. Is there a way I can hide the plug-in file from the IntelliSense parser?
Share Improve this question edited Dec 14, 2009 at 20:28 Peter Mortensen 31.6k22 gold badges110 silver badges133 bronze badges asked Nov 12, 2008 at 21:50 fleshflesh 23.9k24 gold badges82 silver badges98 bronze badges4 Answers
Reset to default 9Service Pack 1 added the following feature:
If you "anyfile.js" and "anyfile-vsdoc.js" in the same directory, then any references to "anyfile.js" will automagically be converted to a reference to "anyfile-vsdoc.js" behind the scenes.
Add an empty file next to your plugin with "-vsdoc" appended to the filename. That should "hide" the plug-in from the external javascript processor.
You could always load it from your code-behind instead of the scriptmanager in your aspx/master. That way the IntelliSense doesn't know it's there. Using ScriptManager.RegisterClientScriptInclude(..).
It could be that third party JavaScript plugin you're using has some errors in it.
I would check the code in JSLint and directed this question to the author of the plugin.
As for the question itself: I don't think you can exclude it if it's a part of the project, but go over the MSDN: Using IntelliSense to prove it.
Since you mentioned jQuery, you could also load the troublesome script during runtime.
$.getScript("XXX.js");
版权声明:本文标题:asp.net - Is there any way to 'hide' a JavaScript file from IntelliSense in Visual Studio 2008? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745542061a2155226.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论