7

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?

1 Answer 1

6

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({
    nuget push -Source "NEW-FEED" -ApiKey AzureDevOps $_.Name
})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.