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

Navigating to Component within same RCL goes to razor__bg__virtual.cs #9361

Open
garrettlondon1 opened this issue Oct 5, 2023 · 6 comments
Assignees
Milestone

Comments

@garrettlondon1
Copy link

garrettlondon1 commented Oct 5, 2023

image

Navigating to a component in my razor class library with the latest C# extension in VS code (2.4.4), navigates to a razor__bg__virtual.cs class, but when hovered over, it is successfully able to resolve the component reference and namespace

Note: Closing and reopening the component leads to the same result

Reloading window leads to same result. Note: this is a newly added component, in the same working session

@ghost ghost added the untriaged label Oct 5, 2023
@garrettlondon1 garrettlondon1 changed the title Navigating to Component in RCL goes to razor__bg__virtual.cs Navigating to Component within same RCL goes to razor__bg__virtual.cs Oct 5, 2023
@davidwengier
Copy link
Contributor

Thanks for the report. This is the same underlying problem that causes #9369

@phil-allen-msft phil-allen-msft added this to the 17.9 P1 milestone Oct 5, 2023
@ghost ghost removed the untriaged label Oct 5, 2023
@davidwengier
Copy link
Contributor

@garrettlondon1 just noticed the "_bg" in the filename. This implies you're using OmniSharp, or have the C# extension set to use OmniSharp at least. Is that correct? Does the problem still exist if you turn that off?

@garrettlondon1
Copy link
Author

Sorry, forgot to mention that.. I had tried three modes of working with the extensions setup:

  1. C# 1.26 - usable but missing important things
  2. C# latest version with Omnisharp enabled - most usable
  3. C# latest version with Omnisharp disabled - completely lose all syntax highlighting, no namespace recognition, cant jump into any references and classes arent recognized.

Also, I do not have the C# dev kit installed, I was having performance issues on my Surface 4 with memory usage. Let me try that again

@garrettlondon1
Copy link
Author

garrettlondon1 commented Oct 6, 2023

Omnisharp is able to recognize services @injected into the _Imports.razor, and even with C# dev kit I get CS0246 in the code behind file for unrecognized component references, as well as the component tag in the .razor page is unrecognized. Reloading the window, as well as reopening VS code doesn't help

@garrettlondon1
Copy link
Author

garrettlondon1 commented Oct 6, 2023

image image

Firm is a class, Modal is a component reference, and syntax highlighting is lost with Omnisharp disabled. I even tried restarting the language server, and sorry to jump off topic, but that's why I can't disable Omnisharp. Shoutout dan roth for the searchbox component :)

image

Here is the same with Omnisharp enabled 5 mins later after files were indexed

@davidwengier
Copy link
Contributor

davidwengier commented Oct 6, 2023

That's not off topic, thats reporting bugs 😁

(though okay.. separate issues is probably ideal, but we'd rather have the information somewhere than not)

@phil-allen-msft phil-allen-msft modified the milestones: 17.9 P1, 17.10 P1 Jan 5, 2024
@phil-allen-msft phil-allen-msft modified the milestones: 17.10 P1, 17.10 P2 Feb 13, 2024
@phil-allen-msft phil-allen-msft modified the milestones: 17.10 P2, 17.10 P3 Mar 11, 2024
@phil-allen-msft phil-allen-msft modified the milestones: 17.10 P3, 17.11 P2 May 2, 2024
@phil-allen-msft phil-allen-msft modified the milestones: 17.13 P1, 17.13 P2 Nov 14, 2024
@phil-allen-msft phil-allen-msft modified the milestones: 17.13 P2, 17.13 P3 Dec 6, 2024
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

No branches or pull requests

3 participants