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

Blazor add missing using to _Imports automatically #6155

Closed
vsfeedback opened this issue Mar 8, 2022 · 2 comments · Fixed by #11241
Closed

Blazor add missing using to _Imports automatically #6155

vsfeedback opened this issue Mar 8, 2022 · 2 comments · Fixed by #11241
Assignees
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author feature request Large improvement request
Milestone

Comments

@vsfeedback
Copy link

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


I find myself and maybe other developers do as well frequently and repeatedly moving @using directives into _Imports.razor than keeping them in the Blazor component. This has to be done manually because all usings are added into the Blazor component.

Thus I suggest that add using has an option in Blazor editor (via Tools -> Options) where I could toggle if the using is added to the component or directly into _Imports.razor upon Alt+Enter -> add missing using (or what is the feature called).

Thank you!

Jan


Original Comments

Feedback Bot on 2/27/2022, 07:26 PM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. You will hear from us in about a week on our next steps.

@ghost ghost added untriaged author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author labels Mar 8, 2022
@NTaylorMullen
Copy link
Contributor

Decision on action: Add a light bulb to promote a using statement into the _Imports.razor file (and possibly from _Imports.razor into another _Imports.razor).

@NTaylorMullen NTaylorMullen added the feature request Large improvement request label Mar 10, 2022
@NTaylorMullen NTaylorMullen added this to the Backlog milestone Mar 10, 2022
@ghost ghost removed the untriaged label Mar 10, 2022
@janseris
Copy link

@NTaylorMullen yeah, the idea was like that for current project, usings in Blazor code would be automatically put into _Imports when doing Alt+Enter (Ctrl + dot) add missing using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author feature request Large improvement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants