Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't load Razor when not necessary #10279

Closed
davidwengier opened this issue Apr 19, 2024 · 0 comments · Fixed by dotnet/roslyn#73172 or #10287
Closed

Don't load Razor when not necessary #10279

davidwengier opened this issue Apr 19, 2024 · 0 comments · Fixed by dotnet/roslyn#73172 or #10287
Assignees

Comments

@davidwengier
Copy link
Contributor

davidwengier commented Apr 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant