Autofix option to Generate variable in other class adds unneccesary usings that are implicit
#72,764 建立於 2024年3月27日
倉庫指標
- Star
- (20,414 star)
- PR 合併指標
- (平均合併 6天 17小時) (30 天內合併 256 個 PR)
描述
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work] If I use the option in the below image to generate a variable in another class, in this case it will generate a URI field, it will add a using for System, this is even though we use implicit usings and we do not want that reference. This is leading to a lot of rework on code reviews where unnecessary usings are being picked up and rework and then restarting our whole build process etc. I believe this is the same for a lot of these helper functions where it just adds a using when it may not be required.
If it is too complicated for whatever reason to look up the implicit usings, it would be much better if it didn't try to automatically add the using itself. And if it was required we would at least get a build error and can manually add it.

Original Comments
Feedback Bot on 3/26/2024, 10:26 PM:
(private comment, text removed)
Original Solutions
(no solutions)