visual-studio 如何让 Visual Studio 为 .asp 文件执行 vbscript 语法高亮显示?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1977481/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I get Visual Studio to do vbscript syntax highlighting for .asp files?
提问by adambox
asp files are highlighted as html in Visual Studio 2008 unless I put language=vbscript in all my <% > code blocks. lame! when I go to tools -> options -> text editor -> file extention I don't get vbscript or vb as an option, only c#, c++, html, etc
asp 文件在 Visual Studio 2008 中突出显示为 html,除非我将 language=vbscript 放在所有 <%> 代码块中。瘸!当我转到工具 -> 选项 -> 文本编辑器 -> 文件扩展名时,我没有将 vbscript 或 vb 作为选项,只有 c#、c++、html 等
回答by adambox
turns out VB wasn't installed :P
原来没有安装VB:P
- make sure it is
- in VS, go to tools -> options -> text editor -> file extension
- add asp as the extension and pick Visual Basic as the editor
- 确保它是
- 在 VS 中,转到工具 -> 选项 -> 文本编辑器 -> 文件扩展名
- 添加 asp 作为扩展并选择 Visual Basic 作为编辑器
回答by Milan
I am having the same issue. I managed to adjust the VBScript text Editor colors in interim by going to
我有同样的问题。我设法通过转至临时调整了 VBScript 文本编辑器的颜色
TOOLS -> Options -> Environment -> Fonts & Colors
Show Settings For:Text Editor
显示设置:文本编辑器
Display Items:scroll down to VBScript and adjust the colorsfor each item.
显示项目:向下滚动到 VBScript 并调整每个项目的颜色。
It's not perfect but at least it is not B&W anymore.
它并不完美,但至少它不再是黑白的。
回答by VISHNU
Go to IE ,Tools-->Inter net Options-->Advanced--> Browsing --> Uncheck Disable Script Debugging(IE)--->Hit Apply Button
转到IE,工具-->互联网选项-->高级-->浏览-->取消选中禁用脚本调试(IE)--->点击应用按钮
Then got to your VS
然后到了你的 VS
Tools --> Options --> Text Editor --> File Extensions --> On the Right Pane,Type your File Extension which you want to Debug(Ex: vb (or) js) in Extensions Box, Choose Editor "Script Editor" -->Hit Add Button --> Check "Map Extension Files to" ---> Select "Microsoft Visual C#" -->Enter "OK" Button Now you run the application and debug the script.
工具 --> 选项 --> 文本编辑器 --> 文件扩展名 --> 在右侧窗格中,在扩展框中键入要调试的文件扩展名(例如:vb(或)js),选择编辑器“脚本编辑器” " --> 点击添加按钮 --> 选中“将扩展文件映射到” ---> 选择“Microsoft Visual C#” --> 输入“确定”按钮 现在您运行应用程序并调试脚本。

