I'm currently migrating from TFS 2012 to Azure DevOps 2019 (both on-premise). With the old server, I would manually create NuGet packages from some of our builds, and host these .nupkg
files on a file share (configured as a package source in Visual Studio). With DevOps, I can obviously automate all of this and push the packages straight into an artifact feed.
The old server needs to be decommissioned, so I would like to move the existing .nupkg files out of the file share into the new artifacts feed. Is this possible?
Select Tools | NuGet Package Manager | Package Manager Settings. Locate the Package Sources section and click the Add button to add a new package source. Set the Name to “PartsUnlimitedShared” and paste the Source URL copied earlier. Click Update followed by OK.
Restore packages with NuGet restoreNavigate to your classic pipeline definition, and then select Edit. Select + to add a new task. Search for NuGet, and then select Add to add the task to your pipeline. Name your task and select Restore from the Command.
Yes, you can push existing .npukg
files to the new feed.
You can create a simple PowerShell script that pushes to the feed all your .nupkg
files:
# If you didn't add the new feed to your NuGet sources so add it:
nuget sources Add -Name "NEW-FEED" -Source "https://pkgs.dev.azure.com/org/_packaging/NEW-FEED/nuget/v3/index.json"
# Put all the nugets in one folder and move to this folder
cd path/to/nupkg/folder
$files = dir
$files.ForEach({
push -Source "NEW-FEED" -ApiKey AzureDevOps $_.Name
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With