C
C#•4mo ago
z0mb

Visual Studio (2022 Professional) Quick Fix not offering "Install Package X" option.

As the title states, currently using Visual Studio 2022 Professional. In the past, I would be able to paste code in, hover over items in the code that required some 3rd party package (Usually a Microsoft one) and press ctrl+. and be presented with the option to quickly/easily install the package. Lately this has disappeared from my environment. I verified that my NuGet package sources are up to date, I have most all of the intellisense options turned on under C#, and I even tried reseting all of my settings. The option is still not there. Any ideas?
No description
6 Replies
z0mb
z0mb•4mo ago
I just got a new VM and re-installed my environment, my initial assumption is even though I have the standard NuGet package source setup, it's searching local projects for packages to use. I've not cloned any of those down onto this new VM.
lycian
lycian•4mo ago
Unfortunately that's not how it works. What package would you expect it to be offering in the case of failure? To elaborate a bit, the code action itself is sanctioned from a list procured from top nuget.org packages. That means that it may not be guaranteed your package will be suggested. If you're seeing something like "Microsoft.Extensions.Hosting" not showing up then definitely file feedback with a repro 🙂
z0mb
z0mb•4mo ago
Thank you for responding and for the additional elaboration, I've tried similar things for other top nuget packages (Newtonsoft, Various Microsoft packages, AutoMapper, etc). None of which present me the option to install the package from the quick help menu (even if I have preemptively included the using statements for them).. Almost certain it's a me problem, but unsure as this is a fresh install. It's not a game ender by any means - more of a it bothers me issue lol. Not at my PC ATM to provide any sort of file but hopefully that gives more context.
lycian
lycian•4mo ago
If you end up doing a clean install, I recommend a repair rather than uninstall/reinstall. It is faster and cleans up things a bit better
z0mb
z0mb•4mo ago
I'll give it a shot Unfortunately no luck, i'll just have to get over it and manually work it when adding common packages.
lycian
lycian•4mo ago
If you can, definitely file a feedback with a recording. The team is usually pretty responsive (I used to work on it). If you hit issues getting traction don't hesitate to follow up here