C# VSIX IViewTaggerProvider for.asp
我在经典asp(.asp)中有一些代码,但visual stuio 2019(或2013)不支持视觉匹配支撑,只支持使用GotoBrace命令(Ctrl+])匹配支撑。 因此,我决定创建一个visual studio扩展,并修改了此处的示例以添加对.asp的支持: 但我可以让它为asp工作。 我为.asp创建了一个ContentTypeDefinition,并没有成功地使用它C# VSIX IViewTaggerProvider for.asp,c#,visual-studio-2019,vsix,C#,Visual Studio 2019,Vsix,我在经典asp(.asp)中有一些代码,但visual stuio 2019(或2013)不支持视觉匹配支撑,只支持使用GotoBrace命令(Ctrl+])匹配支撑。 因此,我决定创建一个visual studio扩展,并修改了此处的示例以添加对.asp的支持: 但我可以让它为asp工作。 我为.asp创建了一个ContentTypeDefinition,并没有成功地使用它 internal static class FileAndContentTypeDefinitions { [E
internal static class FileAndContentTypeDefinitions
{
[Export]
[Name("aspwithbrace")]
[BaseDefinition("html")]
internal static ContentTypeDefinition hidingContentTypeDefinition;
[Export]
[FileExtension(".asp")]
[ContentType("aspwithbrace")]
internal static FileExtensionToContentTypeDefinition hiddenFileExtensionDefinition;
}
[Export(typeof(IViewTaggerProvider))]
[ContentType("aspwithbrace")]
[TagType(typeof(TextMarkerTag))]
internal class BraceMatchingTaggerProvider : IViewTaggerProvider
{
我测试了不同类型的BaseDefinition,比如“text”、“asp”、“html”,但没有成功。
扩展是加载的,因为我可以放置断点,但它不会在构造函数或函数中中断。
经典的asp似乎在使用“html(Web表单)”类型,从工具>选项>文本编辑器html(Web表单)
我错过什么了吗?有没有其他方法可以将我的扩展添加到现有的asp模式中?事实上,在清理解决方案、重建它并卸载它所使用的扩展后,
[BaseDefinition(“html”)]
但我不知道为什么它在我的第一次测试中不起作用