Skip to content

New Razor editor: Go to definition does not work for components defined in a Razor library #4956

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:Other]
Trying the new Razor editor in VS 2019 16.9 preview 3, having the experimental features turned on in Tools| Options.
The announced function "Go to component definition" function (F12) does not work if the component has been defined in a referenced Razor library.

Steps to reproduce:

  1. create a new Blazor project (server-side) using the default template
  2. open Index.razor, put the component. Try the "Go to definition" function on the component. It correctly opens the definition of the component in Counter.razor. So far ok.
  3. add a new Razor lib project to the solution. It will by default contain the Component1.razor component. Reference the Razor lib in the Blazor project
  4. add the Component1.razor to the Index.razor page. Try "Go to definition" on the component - it does not work (it does nothing)

More observations: I have tried the following scenarios, none of them works -

  • Added the component as <RazorClassLibrary1.Component1 /> ... did not work
  • Added the component as and added @using RazorClassLibrary to the Index.razor ... did not work
  • Added the component as and added @using RazorClassLibrary to the _Imports.razor ... did not work

Original Comments

Feedback Bot on 1/27/2021, 09:43 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions