Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Visual Studio Autocomplete to list classes outside of namespace?

When I type in the autocomplete/intellisense for Visual Studio, if the thing I'm trying to reference isn't part of the current namespace, it won't show it at all.

Is there a way to get the Visual Studio autocomplete to include the names of classes that are in my solution, but not necessarily in my current namespace? This would be similar to how the autocomplete for Typescript works in VS Code - it lists things that match what you type, then automatically imports them upon completion.

IntelliJ autocomplete for Java also works the way I'd like it to - when I start typing, it gives me a list of all the various things that match, including their classpath, so I can pick the one I need.

If this is a thing for Visual Studio, I can't figure out how to configure it to do this.

like image 727
theMayer Avatar asked Jan 17 '26 11:01

theMayer


2 Answers

ReSharper you will do the job (expensive but powerful). https://www.jetbrains.com/help/resharper/Coding_Assistance_Code_Completion_Auto.html

If you need just to extend VS intellisense you can try this one: https://marketplace.visualstudio.com/items?itemName=Dreamescaper.IntellisenseExtender2019

like image 114
ambek.net Avatar answered Jan 20 '26 02:01

ambek.net


With Visual Studio 2019 now there is an IntelliSense option to "Show items from unimported namespaces" to achieve similar functionality to ReSharper. You still need to have added a reference to the project though.

like image 20
Falconne Avatar answered Jan 20 '26 00:01

Falconne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!