Can I copy the nuget package configuration from one project to another?

This question is a bit old, but I decided to share how I am doing this to anyone looking for the same:

  1. Drag & drop the packages.config from the project where the packages are already installed to the new project.
  2. Open the Package Manager Console
  3. Type:

    Update-Package -Reinstall -ProjectName [name of your target project]

  4. Press enter :)
I hope it helps

Using Visual Studio - open both projects ( .csproj files ). Copy the <ItemGroup> containing the <PackageReference /> definitions. Save the target project.


You can right click on solution node and select "Manage packages for solution" then you will see a list of installed packages in the solution ,by selecting each package and clicking "Manage" button you can say which package belongs to which project.