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

Code cleanup removes usings from external C# files #75979

Open
vsfeedback opened this issue Nov 19, 2024 · 0 comments
Open

Code cleanup removes usings from external C# files #75979

vsfeedback opened this issue Nov 19, 2024 · 0 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vsfeedback
Copy link

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


[severity:It's more difficult to complete my work]

  • Load a .cs file into the IDE which is not part of the current Solution
  • Run code cleanup (with "remove unused usings" feature enabled)
  • Most of the usings are deleted from the file because cleanup doesn't have any knowledge of the types used in the file.

Why this matters:

  • When debugging nuget library code in my application, I load the library source files in my IDE so I can single step through the library code. However, because the library file is not in the current solution, and I have "run code ccleanup on save" enabled, my library files become corrupted every few minutes.
  • I often load source files from other Solutions to search/view/copy their code. If I happen to save while viewing a file, it corrupts the code. (As with most experienced computer users I automatically hit save about every 10-15 seconds to protect my work)

I can work around this by disabling useful features (automatically add usings, clean away the unused usings, clean up when saving), but it would be nice if it only removes "usings that it knows are not used" instead of "usings it doesn't know are used".


Original Comments

Feedback Bot on 11/14/2024, 05:58 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.

Feedback Bot on 11/19/2024, 00:47 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant