How do i reset nuget and start afresh?

5.5k views Asked by At

here's what's happening. within the last few days something happened to my solution that apparently broke nuget. when i go into package manager/installed and do a find on SignalR, nothing comes back as if SignalR wasn't installed when i know it is. when i go into manager/online and do the same, all the signalr libraries do appear but with green checkmarks next to them as if they WERE installed. but i have to way of uninstalling/reinstalling. this has been driving me crazy since i now can't seem to get a stable solution. on top of that, running nuget commands from the console always result in a CommandNotFoundException. nothing works except get-help Nuget. what i'd like to do is reset everything related to Nuget so i can reinstall those packages from scratch and hopefully fix the console commands. any ideas?

1

There are 1 answers

1
tqrecords On BEST ANSWER

I think this happened to me a few times. Go to the packages.config file that should be the root directory of your project and remove the insurgent (in your case the line with the package: SignalR). This will tell NuGet that the package was never installed.

Now you will be able to reinstall it through the repository, then uninstall it so everything is back to the way it was before you got into this mess. I am unsure how it is occurring.