Manually add a nupkg file to TeamCity Feed?

I have a TeamCity server with Nuget enabled. I would like to manually add third-party nupkg files to it. Can this be done?

+7
nuget teamcity nuget-package
source share
2 answers

There is an ambiguous pronoun (it) in your question, so I will answer both cases.

Is it possible to manually add a third party nupkg file to a Nuget feed? Yes. Just send the package to the feed. Either through nuget.org, or if it is a private channel, to the URL of the private channel. I assume that if so, you should use a private feed. TeamCity also has an internal NuGet channel that can be published directly. Read more: How to add a custom nuget channel to a TeamCity assembly?

Is it possible to manually add a third-party nupkg file directly to TeamCity No. You will need to go through the NuGet feed. However, nuget.exe supprots sets up a local repository, but is not sure if Team City supports this syntax.

After all this, it may be easier for you to simply check your nuget directroy source packages so that you don’t have to worry about restoring packages on your build server. This way you don't have to bother with this, just add your third-party nupkg files to the packages directory in your solution.


UPDATE: As an alternative to adding your packages to the original control, you can configure your NuGet personal channel and localhost or purchase it using the MyGet tool. You can then configure your feed as the source of the nuget package in TeamCity.

0
source share

You can add nupkg to your personal channel either using the ready-made TeamCity type "NuGet Publish" or using NuGet exe.

  • Out of the box NuGet Publish: Configure the build step with the type "NuGet Publish". In the NuGet settings, specify the location of the .nupkg file relative to the statement directory. Also put the API key and package source (URL of your personal NuGet channel). Then run this build step and it should publish your package. It might be better to have the previous steps that rename the package to avoid confusion.

  • CommandLine NuGet.exe: configure the build step with the command line type "Command Prompt". Select "Executable with options" in the "Run" section. enter the path to NuGet.exe in the "command executable" section and add the following parameters to the "command parameters" - click {Package path} {Package name} .nupkg {API-KEY} -Source {URL-to -Frequent-Feed }

+2
source share

All Articles