Question

I am using visual studio 2013 and have configured my Team City to publish a nuGet feed. I have added that feed to my nuGet sources in Visual Studio and then downloaded a package, Everything worked as expected. The issue is that since I installed the package I have not been notified of any updates for that package from Team City. When I open the package manager and look at the package the Update button is there so Visual Studio knows there is an update. Is there a way to get Team Cities nuGet feed to add notifications to the notifications well or anywhere in the IDE?

Was it helpful?

Solution

This is actually a nuget thing and not directly related to TeamCity. The official nuget feed behaves this way as well. To enable the behavior you desire do the following..

1) Download Nuget.exe Command Line Utility
2) Add Nuget.exe to your path, or store it in your Solution someplace
3) Add a prebuild event to your project

Nuget.exe update ..\..\Packages.config

4) Profit

1>------ Build started: Project: ConsoleApplication8, Configuration: Debug Any CPU ------
1>Build started 3/24/2014 3:00:00 PM.
1>PreBuildEvent:
1>  C:\Nuget.exe update ..\..\Packages.config
1>  Looking for installed packages in '..\..\..\packages'.
1>  Updating 'ConsoleApplication8'...
1>GenerateTargetFrameworkMonikerAttribute:

According to the docs you can also target a .csproj file or a .sln (havent tried that though)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top