Reactivate the nuget Package Manager in visual studio 2022

Percy Chavez 20 Reputation points
2023-06-10T15:37:59.2066667+00:00

I am currently unable to access the nuget package manager, when trying to add a package from a file it seems to clear the nuget storage.

And now when entering "Package origins" within "Package manager configuration", this error is displayed:

User's image

And then it displays the empty nuget package source and when I add a new mapping Visual Studio restarts

User's image

User's image

which makes it unable to access the nuget package manager. What should I do to re-enable the nuget Package Manager?

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-06-12T07:08:53.3633333+00:00

    Hi @Percy Chavez

    Welcome to Microsoft Q&A! 

    How did you add a package from a file? 

    Please close all running Visual Studio Instances and update your VS2022 to the latest version. 

    Then, run your VS2022 as administrator and add a package source as the following steps:

    Go to Tools > Options > NuGet Package Manager > Package Sources > select “+” > edit the Name to nuget.org > enter https://api.nuget.org/v3/index.json in Source > Update

    After restarting your Visual Studio, please create a new project to check it again.

    If it persists, please transfer your error message into English and share me the detailed information to investigate it further. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.