Hello @Falanga, Rod, DOH,
I think you mean "Shift-F2"(AddQuickFile), instead of "Contr-F2"(Window.MovetoNavigationBar) :D
Creating a .razor file by using Shift-F2 is the same as right-clicking| Add | Razor Component. I’m curious, if you then try the Shift-F2 to create a new .razor file again, will the same error appear?
You may check and confirm following things:
- Make sure that the .razor file is successfully created in the specified project, you set that project as the startup project and run that specific project, instead of another project.
- Consider that some cache files interfere VS. Try to clean your project/solution(manually remove bin, obj and the hidden .vs folder) and rebuild your project.
- From your description, I guess you were testing in an existing project which you are developing right? Did you try a newly created project and test again to confirm this issue?
I tested with newly created ASP.NET Core (MVC) project, and follow this document: Add Blazor support to an ASP.NET Core app to integrate the component, also follow the steps that you mentioned in your original post, but failed to reproduce this issue.
If you can reproduce this issue in a newly created project, please, maybe, kindly share us complete steps or a .gif picture(do not include any privacy information) to reproduce this issue and check further.
Feel free to contact us.
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.