nugget package load problem

Haviv Elbsz 2,071 Reputation points
2023-04-11T14:39:21.36+00:00

Hello all. I copied my project to a new computer and I have a problem that in nugget restore is a problem because all nugget not exist. how I can know which nugget to install. currently in loaded tab there is nothing installed and I don't know which packages to install. please help in this. Thank you very much.

Developer technologies .NET .NET MAUI
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-04-12T07:11:16.8033333+00:00

    Hello @Haviv Elbsz ,

    Thanks for taking time to post this issue in Microsoft Q&A forum.

    1 know which packages to install in your copied project

    If your project  use packages.config reference that is used in some project types to maintain the list of packages referenced by the project, you will find package lists in this file.

    Example:

    <packages>
    	<package id="Newtonsoft.Json" version="10.0.1" targetFramework="net6.0" />
    </packages>
    
    

    If your project uses PackageReference in project files ,please right click the project in visual studio and select edit project file to open project file. And search <ItemGroup> elemet in your .csproj file. Example:

    <ItemGroup>
    	<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
    </ItemGroup>
    
    

    2 restore nuget package

    In Visual Studio on Windows, you can restore packages automatically or manually.Configure Package Restore through Configure the following Package Restore options at Tools > Options > NuGet Package Manager > General:

    Select Allow NuGet to download missing packages to enable package restore.

    Select Automatically check for missing packages during build in Visual Studio to automatically restore any missing packages when you run a build from Visual Studio.

    Also, you can restore by using the NuGet CLI

    nuget restore <projectPath>
    

    For more information to restore, please refer to NuGet Package Restore

    Feel free to contact us.

    Sincerely,

    Douxu


    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 ourdocumentation 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.