itnifl
asked on
Remove unused usings from code in MonoDevelop
When I google this I see that this should be possible, but I can't find any menu item anywhere that does this in MonoDevelop 4.0.12. In Visual Studio it is easy. How do I do this automatically in MonoDevelop?
ASKER
In former MonoDevelop versions there was a menu item called "Organize Usings".
In newer Versions you should try this:
Edit -> Preferences -> Other -> Source Analysis -> Enable Source Analysis.
When cursor is in usings section you should now see a yellow bulb, on which you can click or press Alt+Return to remove unused usings...
In newer Versions you should try this:
Edit -> Preferences -> Other -> Source Analysis -> Enable Source Analysis.
When cursor is in usings section you should now see a yellow bulb, on which you can click or press Alt+Return to remove unused usings...
ASKER
Under Edit -> Preferences -> Other I only have Log Agent.
Alt+Return only gives me the option to sort usings.
Alt+Return only gives me the option to sort usings.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
=== MonoDevelop ===
Version 4.0.12
Installation UUID: 06d78296-a762-47ff-a56a-1d
Runtime:
Mono 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1.1) (64-bit)
GTK 2.24.23
GTK# (2.12.0.0)
=== Build Information ===
Git revision:
Build date: 2014-01-08 14:59:33+0000
=== Operating System ===
Linux
Linux CreativeNode 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
ASKER
Thank you for the tip, I Google'd with the name Xamarin instead of MonoDevelop and found this:
https://forums.xamarin.com/discussion/21534/remove-sort-using-is-this-available-from-the-xamarin-studio
"Make sure you have source analysis enabled in the preferences pane and a new context menu option should be available."
This will grey out unused usings and right clicking will let me refactor or fix that in the menu that appears.
https://forums.xamarin.com/discussion/21534/remove-sort-using-is-this-available-from-the-xamarin-studio
"Make sure you have source analysis enabled in the preferences pane and a new context menu option should be available."
This will grey out unused usings and right clicking will let me refactor or fix that in the menu that appears.
I also found this a few minutes ago and just wanted to post it, when I have recognized that you already have assigned the points.
Thank you very much for the points and good luck with MD/XS...
Thank you very much for the points and good luck with MD/XS...
Can you please post, what you have googled and what makes you believe that such a function exist?