Skip to content

Is there any simple way to migrate all our existing NuGet packages to GitHub Package Registry? #26754

Answered by jcansdale
ws-markb asked this question in Packages
Discussion options

You must be logged in to vote

Is there anything like this available, or has anyone else scripted this yet?

The trick will be to update the <repository url="..." /> element in the .nuspec file in your .nupkg. This is mandatory when publishing to GitHub Packages and tells the registry which repository to associate with your package.

I have a .NET Core tool that supports publishing NuGet packages to the GitHub Package registry (and a few other things). You can find it here: https://github.com/jcansdale/gpr

There’s an issue open about automatically adding the repository url on push:

  • Feature: Set default repository and automatically add repository url and type on push
    jcansdale/gpr#48

Feel free to comment or send a PR…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
1 reply
@joshjohanning
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository
4 participants