Skip to content

Vs 2026 support#280

Open
ilGianfri wants to merge 2 commits into
mhutch:mainfrom
ilGianfri:vs-2026
Open

Vs 2026 support#280
ilGianfri wants to merge 2 commits into
mhutch:mainfrom
ilGianfri:vs-2026

Conversation

@ilGianfri

Copy link
Copy Markdown

This pull request adds robust support for future Visual Studio versions by updating the extension to gracefully fall back to a built-in MSBuild classification tagger when the TextMate service is unavailable (as in VS 2026 and later). It introduces a new classification type map, runtime detection of TextMate support, and updates the VSIX manifest to allow installation on future VS versions.

Support for future Visual Studio versions:

  • Updated source.extension.vsixmanifest to allow installation on Visual Studio versions 17.10 and above, removing the upper version limit.

TextMate service detection and fallback:

  • Added new TextMateSupport utility to detect at runtime whether the host supports the legacy TextMate asset service, enabling automatic fallback to the built-in classifier on unsupported versions.
  • Refactored MSBuildTextMateTagger to use the new detection logic and to instantiate the built-in MSBuildClassificationTagger when needed, ensuring reliable classification in all supported VS versions.

Classification infrastructure improvements:

  • Introduced MSBuildClassificationTypeMap to map MSBuild syntax constructs to Visual Studio classification tags, aligning appearance with the built-in XML editor and supporting user customizations.

- added MSBuildClassificationTagger, a self-contained classifier based on XmlBackgroundParser and ExpressionParser, used as fallback when the VS TextMate service is unavailable (issue mhutch#279)
- added MSBuildClassificationTypeMap, mapping MSBuild constructs to the VS XML editor classification types ("XML Name", "XML Delimiter", "XML Attribute", ...) with fallback to built-in theme-aware types
- added TextMateSupport, version gate on the host process (devenv 18+ = TextMate unavailable)
- reworked MSBuildTextMateTagger with an AllowDefault import of ICommonEditorAssetServiceFactory and fallback to the internal classifier for IClassificationTag requests
- added classification of XML punctuation (< > </ /> =), attribute quotes, entity references, processing instructions and CDATA to match the VS XML editor look
- updated source.extension.vsixmanifest, extended InstallationTarget to [17.10,)
- added MSBuildClassificationTaggerTests (8 tests)
- removed the ICommonEditorAssetServiceFactory composition error whitelist in MSBuildTestEnvironment
@ilGianfri ilGianfri changed the title Vs 2026 Vs 2026 support Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant