Vs 2026 support#280
Open
ilGianfri wants to merge 2 commits into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
source.extension.vsixmanifestto allow installation on Visual Studio versions 17.10 and above, removing the upper version limit.TextMate service detection and fallback:
TextMateSupportutility to detect at runtime whether the host supports the legacy TextMate asset service, enabling automatic fallback to the built-in classifier on unsupported versions.MSBuildTextMateTaggerto use the new detection logic and to instantiate the built-inMSBuildClassificationTaggerwhen needed, ensuring reliable classification in all supported VS versions.Classification infrastructure improvements:
MSBuildClassificationTypeMapto map MSBuild syntax constructs to Visual Studio classification tags, aligning appearance with the built-in XML editor and supporting user customizations.