Annoying VS auto-add "using"
-
50% of the time, this is a nice feature. The other 50%, I hate it as I have to clean up the BS it adds. Like
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Runtime.Intrinsics.X86;
using System.Security.Policy;
using Twilio.TwiML.Voice;Seriously? Where does it think I need those??? :rolleyes: And yes, I know I can turn this off, somewhere, but the 50% when I like it, I want it. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework -
50% of the time, this is a nice feature. The other 50%, I hate it as I have to clean up the BS it adds. Like
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Runtime.Intrinsics.X86;
using System.Security.Policy;
using Twilio.TwiML.Voice;Seriously? Where does it think I need those??? :rolleyes: And yes, I know I can turn this off, somewhere, but the 50% when I like it, I want it. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkIt shouldn't do it when it has to autocomplete the referenced item. For example, if it autocompletes ThreadPool but you didn't type it it shouldn't add the using System.Threading.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
50% of the time, this is a nice feature. The other 50%, I hate it as I have to clean up the BS it adds. Like
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Runtime.Intrinsics.X86;
using System.Security.Policy;
using Twilio.TwiML.Voice;Seriously? Where does it think I need those??? :rolleyes: And yes, I know I can turn this off, somewhere, but the 50% when I like it, I want it. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkWhat language? ;P I just delete them all. I use the
using
directive only for aliases and for adding Extension Methods. -
50% of the time, this is a nice feature. The other 50%, I hate it as I have to clean up the BS it adds. Like
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Runtime.Intrinsics.X86;
using System.Security.Policy;
using Twilio.TwiML.Voice;Seriously? Where does it think I need those??? :rolleyes: And yes, I know I can turn this off, somewhere, but the 50% when I like it, I want it. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkThere is also a setting that allows it to remove unused ones on build. Might keep you from manually deleting them. HTH
Jack of all trades, master of none, though often times better than master of one.
-
There is also a setting that allows it to remove unused ones on build. Might keep you from manually deleting them. HTH
Jack of all trades, master of none, though often times better than master of one.
Personally, I can't use that one either without extra configuration work. The reason being is I often target the dotnet framework as well as the newer dotnet offerings, and the newer ones have things like System.Collections.Generic already implicitly declared. Sharing the source file between each would cause an error in the DNF version if the newer dotnet version of the project gets built.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
What language? ;P I just delete them all. I use the
using
directive only for aliases and for adding Extension Methods.Do you mean you use fully qualified type names for all of your variables? That must become tedious after a while.
The difficult we do right away... ...the impossible takes slightly longer.
-
Do you mean you use fully qualified type names for all of your variables? That must become tedious after a while.
The difficult we do right away... ...the impossible takes slightly longer.
Not the "basic" ones with built-in aliases like
int
andstring
, but all the rest, yes. It's my preference. It aids my memory. -
Maybe that's the problem. I hit Enter expecting what I'm seeing to autocomplete but it does something totally different. I think I often jump the gun on the auto-complete. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkThat's exactly what happens to me.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
It shouldn't do it when it has to autocomplete the referenced item. For example, if it autocompletes ThreadPool but you didn't type it it shouldn't add the using System.Threading.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Maybe that's the problem. I hit Enter expecting what I'm seeing to autocomplete but it does something totally different. I think I often jump the gun on the auto-complete. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework -
There is also a setting that allows it to remove unused ones on build. Might keep you from manually deleting them. HTH
Jack of all trades, master of none, though often times better than master of one.
Ron Nicholson wrote:
There is also a setting that allows it to remove unused ones on build.
I'll have to try that! Thanks!
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework -
Ron Nicholson wrote:
There is also a setting that allows it to remove unused ones on build.
I'll have to try that! Thanks!
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkVS renders unused
using
s in a lighter color and I use the built in Sort and Remove Unused Usings command to clean things up. /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
50% of the time, this is a nice feature. The other 50%, I hate it as I have to clean up the BS it adds. Like
using static System.Runtime.InteropServices.JavaScript.JSType;
using System.Runtime.Intrinsics.X86;
using System.Security.Policy;
using Twilio.TwiML.Voice;Seriously? Where does it think I need those??? :rolleyes: And yes, I know I can turn this off, somewhere, but the 50% when I like it, I want it. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkAgree it's annoying. Probably the main reason for my excessive usage of: CTRL R+G - remove unused references and sort the others. CTRL K+E - offically "code cleanup", but for me at least: seems to do R+G and K+D for spacing things ...choice of each mostly dependent on mood.