Search code examples
.netteamcitynuget-packagenuget-server

Migrate nuget Packages From File Share To TeamCity Built-in


I have my nuget packages hosted on a file share, after using TeamCity I enabled the built-in nuget feed. Now comes the question, how I can migrate my old packages from file share to TeamCity so I can decommission the file share and just use the TeamCity instead?


Solution

  • If you are looking to expose 3rd party NuGet packages, you'll need to explicitly publish them as build artifacts. If you are performing a NuGet install prior to compiling your solution then the directory these are restored to should be used as the build artifacts path

    e.g.

    work\234hkj568rt34jk\packages\** =>
    

    Once you've done this you'll be able to consume them from the NuGet feed by adding this as a package source inside Visual Studio

    If it's just internal packages then you just need to run the build configurations and they will be exposed.