New NuGet Support Features in TeamCity

In this post I'll describe recent changes in NuGet Support: default NuGet and feed authentication. All those changes are available in v0.9 branch. The branch is compatible with TeamCity 7.1.x and we plan to bundle builds of it with TeamCity 8.0

Default NuGet Selector

It was quite complicated to update version of NuGet.exe that was selected in all used NuGet build runners. Now it is possible to specify server-wide default version of NuGet in the server administration. In runner and trigger settings you may now specify you want to use default version of NuGet CommandLine

In NuGet runner settings you'll see default item:

Same option is also available for NuGet Dependency Trigger too:

Now you no longer need to change runner settings to upgrade to newer version of NuGet

NuGet Feed Authentication

Recently I pushed support of Authenticated feed for TeamCity-provided build runners and NuGet trigger. Support was implemented with help of the plugin for NuGet.exe

To enable authentication of a feed you need to add a Build Feature called NuGet Feed Credentials:

We decided to leave NuGet Runners UI unchanged for now. I have in mind next feature to implement: TW-20642. If you have something to add, please feel free to comment!. I believe there are a limited number of feeds that are used, so the right place to setup things should be under server administration

I added usernama/password fields for NuGet Trigger settings:

TeamCity provided NuGet Feed

It is now possible to use TeamCity provided NuGet feed with authentication. I added teamcity.nuget.feed.auth.server configuration parameter with URL to authenticated TeamCity's Feed. No you do not need to have guest-visible packages in order to fetch them from dependent build configuration.

Use %teamcity.nuget.feed.auth.server% as TeamCity provided NuGet Feed URL with basic authentication in TeamCity settings

Download and Info:

This version of NuGet plugin for TeamCity is planned to be bundled with TeamCity 8.0 EAP. Plugin is compatible with TeamCity 7.1.x.

For more information, see NuGet plugin home page at:
or download a latest build from TeamCity here

comments powered by Disqus