Do I correctly understand that you want to delete all NuGet packages that are not pinned? The packages available in the feed are bound to the builds' artifacts: they are removed from the feed when the artifacts of the build which produced them are cleaned up. So you should configure clean up rules to delete not needed artifacts.
It is not possible to publish only pinned builds to NuGet. The solution is to create two separate build configurations: A for building the artifacts, B for publishing them to NuGet Feed. B artifact depends on A. So if you want to publish artifacts to NuGet Feed you will Promote needed build in A (instead of pinning). You can configure needed clean up rules for build configuration B.
Another solutions is to publish packages to NuGet feed in both A and B build configurations. But in A with Prerelease flag and in B with Release flag. So you will be able to configure corresponding filters in VS.
Hi Bala,
Do I correctly understand that you want to delete all NuGet packages that are not pinned? The packages available in the feed are bound to the builds' artifacts: they are removed from the feed when the artifacts of the build which produced them are cleaned up. So you should configure clean up rules to delete not needed artifacts.
Hi Alina,
Thanks for your answer.
I don't want to delete the old NuGet packages.
I want to only see the pinned build NuGet in Visual Studio NuGet Manager.
E.g. let say that I have following release builds:
23-01-2015 - 4
20-01-2015 - 3
03-01-2015 - 2 pinned
01-01-2015 - 1
Now I want teamcity to only show the pinned (2) NuGet package in Visual Studio NuGet Manager. Rightnow it's shows the build 4 which the lasted.
So the question is if it possible to only show the pinned NuGet package in VS and not the lasted.?
Regards
Bala
Hi Bala,
It is not possible to publish only pinned builds to NuGet. The solution is to create two separate build configurations: A for building the artifacts, B for publishing them to NuGet Feed. B artifact depends on A. So if you want to publish artifacts to NuGet Feed you will Promote needed build in A (instead of pinning). You can configure needed clean up rules for build configuration B.
Another solutions is to publish packages to NuGet feed in both A and B build configurations. But in A with Prerelease flag and in B with Release flag. So you will be able to configure corresponding filters in VS.