locked
How to Copy Nuget Files to an Output Directory with Nuget.Config File? RRS feed

  • Question

  • User-1058242892 posted

    How do I copy Nuget Packages to Output Directory using Nuget.Config file? Team wants to take all Nuget packages in Solution and move them into 1 folder, after build completion.

    The following will copy Nuget packages to a folder, however its done through project file (csproject), instead of Nuget.Config.

    https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets

    <Target Name="CopyPackage" AfterTargets="Pack">
      <Copy
        SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg"
        DestinationFolder="\\myshare\packageshare\"
        />
    </Target>
    Tuesday, October 22, 2019 6:53 AM

All replies

  • User1634355159 posted

    Hi JoeThomas45,

    Do you want to build multiple projects in one solution and use the same Nuget packages?

    Best Regards,

    Lewis

    Wednesday, October 23, 2019 6:28 AM
  • User-331736001 posted

    did you find any solution?

    Sunday, July 19, 2020 6:06 PM