Reputation: 1005
Is it possible to configure Intellisense to prioritize local variables suggestions over class types?
For example if I declare httpContext
variable I want to get this variable suggestion on top instead of HttpContext
class type.
Example situation screenshot.
--- Edit ---
Providing additional example to distinct httpcontent
behavior from httpContent
.
Different behavior for httpcontent
and httpContent
from the other PC
Upvotes: 5
Views: 1439
Reputation: 23808
Is it possible to configure Intellisense to prioritize local variables suggestions over class types? For example if I declare httpContext variable I want to get this variable suggestion on top instead of HttpContext class type.
This is quite a abnormal behavior. In fact, Visual Studio Intellisense will prioritize local variables rather than class types by default. And in my side, it works perfectly. See this:
So I think there are some environmental factors that cause this error. Please try these suggestions:
close your VS Instance, delete .vs hidden folder, bin, obj folder. And then restart your project again to test it.
clean vs component caches-----delete files under C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\16.0_xxx(16.0 is VS2019,15.0 is VS2017)\ComponentModelCache
disable any third party extensions or just use denvenv /safemode to start VS to test your project in case some other extensions cause this abnormal behavior.
do a repair in VS Installer
if your VS is not the latest version, please try to update it in case there are some fixes.
Update 1
After researching more detailed info provided by you, l find that this should be an issue in visual studio intellisense and in fact, l faced the same issue as you described.
So l have reported this issue on our DC Forum.See this link. You can vote it and comment any detailed info which can raise the team's attention.
Since the process may be a bit long, as a suggestion, you can use the resharper extension which works successfully without this issue.
Upvotes: 2