Skip to content

Don't load Razor when not necessary #10279

@davidwengier

Description

@davidwengier

With cohosting, we're in Roslyn's LSP server which loads for all Roslyn projects. We used to only load for the existence of .razor files (through IDynamicFile) or Razor files being opened (through TextViewConnectionListener/ContentType). We should make things smarter and only do work when we need to, using UI contexts.

See https://learn.microsoft.com/en-us/visualstudio/extensibility/how-to-use-rule-based-ui-context-for-visual-studio-extensions?view=vs-2022 and a useful search

Long term, we probably want this on our package, but we can at least start with the cohosting dynamic registration service.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions