Setting up TeamCity as a native NuGet Server

 

TeamCity 7.0 EAP (Early Access Program) was recently opened and one of the new features is the built-in support for NuGet. I recently blogged about setting up TeamCity to pack and publish NuGet packages via a plug-in and this plug-in is now included by default in TeamCity 7. However, the real new interesting feature is that TeamCity is now a native NuGet repository too!

Native NuGet Server?

Many of those that have been using NuGet, have most likely been using it to consume packages from nuget.org where there are currently over 3800 unique packages, most of which are open source.

image

 

What happens however if for some reason or another you do not want to submit packages to nuget.org? For instance, think that you want to use NuGet to modularize and distribute code inside your own organization, or create libraries for private consumption. In this case, publishing to nuget.org does not make sense. This leaves you with basically two options:

 

  1. Setup your own NuGet repository by downloading and installing the code that nuget.org for instance
  2. Copy nuget packages to a local share and have everyone read off of that

 

Both of these options come with their own share of overhead. With the local share you now require sharing of folders and permissions. Setting up your own NuGet repository also requires managing permissions and whatnot separately. At the end of the day, its another service to manage.

Fortunately, you now have a third option: TeamCity. The same server that builds your projects, runs your tests, packs and publishes your packages can now also serve them. The best part of it is that it is so simple, that I had to take up the rest of this blog with the previous nonsense just to give it some meat.

Enabling TeamCity as a NuGet Server

I am not going to cover how to pack and publish packages in this post. All that is covered in detail in the previous post I wrote, so please read that first if you’re not familiar with the process. Enabling TeamCity as NuGet and making packages available consists of two steps:

 

1. Enable the server to be a NuGet server

 

Go to Administration | Server Configuration | NuGet tab

 

image

Click on the Enable button to enable it. The same screen with then display two different feeds: a public and a private one:

 

image

If by chance the Public Url is not available, you will probably see a message telling you that you need to enable the Guest account in TeamCity, which can be done from the General tab.

 

2. Make your packages be your Artifacts

Since TeamCity itself is going to be a NuGet server, the step to publish a package is no longer required. However, packing the package is. In this step (NuGet Pack Build Type), we can just configure the output for the package to point to some specific folder, for instance packages

 

image

 

We need instruct TeamCity to ouput the results of this folder as artifacts. This is done in the General Settings step of the Build Configuration

 

image

 

and with that, we’re done. Next up is to configure Visual Studio to consume from this feed.

 

Configuring Visual Studio

Although this step is optional, it is recommended to add your repositories to Visual Studio to avoid having to type long URL’s in each time you want to read from a specific package repository. To do this, click on Options | Library Package Manager | Package Manager Settings

 

image

 

We need to add a new NuGet Repository. I’ve called it Local TeamCity  and the URL corresponds to the public URL provided to me by TeamCity in Step 1:

 

image

 

Notice that I have another entry which is Local TeamCity Auth which corresponds to the authenticated version.

Once we have this, we can now easily consume packages from our repository by merely specifying it in the Package Manager Console, either via the Combobox or explicitly in each call:

 

image

 

 

Summary

That’s all there is to it. By merely publishing our packages as artifacts, TeamCity now provides a full-fledged nuget server which opens up great possibilities when it comes to working and managing dependencies between projects. TeamCity is currently in EAP and much of what I’ve described here is in open to improvements. That is why your feedback is very important. Download 7 and start playing with it today. Let us know what you think.


Posted 12-01-2011 5:27 PM by Hadi Hariri
Filed under: , ,

[Advertisement]

Comments

Chris McKenzie wrote re: Setting up TeamCity as a native NuGet Server
on 12-02-2011 11:29 AM

Is this NuGet server file based? Our team noticed performance problems when a nuget file share acquired a large number of packages. We switched to the github NuGetGallery project which stores the package metadata in a database.

Hadi Hariri wrote re: Setting up TeamCity as a native NuGet Server
on 12-02-2011 2:12 PM

@Chris,

It's out own implementation, not based on file share.

buy imitrex wrote re: Setting up TeamCity as a native NuGet Server
on 02-14-2013 5:51 AM

e2Q1KA I cannot thank you enough for the blog article.Much thanks again. Fantastic.

buy imitrex wrote re: Setting up TeamCity as a native NuGet Server
on 02-15-2013 1:18 PM

4R8Coy Im obliged for the blog article.Much thanks again. Will read on...

clomiphene 25 mg wrote re: Setting up TeamCity as a native NuGet Server
on 02-24-2013 11:17 PM

BO6mdc Thank you ever so for you blog article.Really thank you!

clomiphene 25 mg wrote re: Setting up TeamCity as a native NuGet Server
on 02-27-2013 7:54 AM

FSFPHF I think this is a real great article.Much thanks again. Great.

buy clomid no prescription wrote re: Setting up TeamCity as a native NuGet Server
on 02-27-2013 1:10 PM

HJih06 Really informative article post.Thanks Again. Really Cool.

buy discount viagra wrote re: Setting up TeamCity as a native NuGet Server
on 03-03-2013 10:20 AM

QEZDxx Thanks for sharing, this is a fantastic blog post.Really thank you!

social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 03-13-2013 11:52 PM

8qvSFO Awesome blog.Really thank you! Fantastic.

bookmaring service wrote re: Setting up TeamCity as a native NuGet Server
on 03-14-2013 4:50 PM

IGxYix This is one awesome article.Really looking forward to read more. Really Cool.

buy social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 03-23-2013 9:30 PM

12SUhF Muchos Gracias for your blog.Really thank you! Great.

buy social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 04-03-2013 7:05 PM

y3OMki Thank you ever so for you article post.Really looking forward to read more. Great.

comedy channel wrote re: Setting up TeamCity as a native NuGet Server
on 04-05-2013 9:54 PM

Hey, thanks for the blog.Really thank you! Much obliged.

social bookmarking service wrote re: Setting up TeamCity as a native NuGet Server
on 04-08-2013 3:40 AM

K0JFIR Thank you ever so for you blog article. Great.

buy social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 04-13-2013 4:44 AM

hSoCfT This is one awesome blog.Thanks Again. Really Great.

buy social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 04-20-2013 3:34 AM

f7EtkH Great, thanks for sharing this blog article.Really looking forward to read more. Fantastic.

buy social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 04-24-2013 12:37 AM

TAd7M9 Wow, great article post.Really looking forward to read more. Will read on...

slr lenses wrote re: Setting up TeamCity as a native NuGet Server
on 05-13-2013 8:27 PM

E3oMbU I appreciate you sharing this blog post.Really looking forward to read more. Keep writing.

best social bookmarks wrote re: Setting up TeamCity as a native NuGet Server
on 06-19-2013 9:21 AM

Gq8bJS I really like and appreciate your post.Really looking forward to read more. Really Cool.

news and many more wrote re: Setting up TeamCity as a native NuGet Server
on 07-04-2013 9:16 AM

bSbOQJ Thanks for the blog.Thanks Again. Want more.

buy viagra online cheap wrote re: Setting up TeamCity as a native NuGet Server
on 07-24-2013 8:06 AM

Thanks for sharing, this is a fantastic article.Really looking forward to read more. Keep writing.

here wrote re: Setting up TeamCity as a native NuGet Server
on 07-25-2013 10:23 AM

I really like and appreciate your blog. Much obliged.

buy viagra online cheap wrote re: Setting up TeamCity as a native NuGet Server
on 07-25-2013 8:55 PM

Really appreciate you sharing this blog post.Thanks Again. Great.

hot news wrote re: Setting up TeamCity as a native NuGet Server
on 07-26-2013 11:18 AM

NrlLn2 Im thankful for the article.Really thank you! Really Cool.

super news that are fun wrote re: Setting up TeamCity as a native NuGet Server
on 08-04-2013 11:44 PM

jem7HJ I am so grateful for your blog.Really thank you! Much obliged.

awesome links for you wrote re: Setting up TeamCity as a native NuGet Server
on 08-19-2013 9:55 AM

bn55KR Im obliged for the article.Thanks Again. Really Cool.

awesome links for you wrote re: Setting up TeamCity as a native NuGet Server
on 08-19-2013 7:36 PM

EpncRQ Im grateful for the blog article.Really looking forward to read more. Really Cool.

great seo service wrote re: Setting up TeamCity as a native NuGet Server
on 09-04-2013 3:11 AM

1NJ5gS Awesome article post.Really thank you! Keep writing.

cheap link building wrote re: Setting up TeamCity as a native NuGet Server
on 09-24-2013 2:29 PM

22nRKd Say, you got a nice blog article.Really thank you! Great.

best linkbuilding wrote re: Setting up TeamCity as a native NuGet Server
on 10-01-2013 2:16 AM

54Banw Great, thanks for sharing this blog.Really thank you! Great.

link building team wrote re: Setting up TeamCity as a native NuGet Server
on 10-16-2013 1:25 AM

BkiYIV I really like and appreciate your blog.Thanks Again. Will read on...

link building wrote re: Setting up TeamCity as a native NuGet Server
on 10-24-2013 12:15 PM

oLqoOk Muchos Gracias for your blog article.Really looking forward to read more. Cool.

smashing top seo wrote re: Setting up TeamCity as a native NuGet Server
on 11-01-2013 2:49 AM

X36mTG Very good article.Much thanks again. Awesome.

high quality backlinks wrote re: Setting up TeamCity as a native NuGet Server
on 07-19-2014 2:54 AM

9QFbO1 I appreciate you sharing this post.Really thank you! Keep writing.

matzcrorkz wrote re: Setting up TeamCity as a native NuGet Server
on 08-06-2014 7:36 PM

JqJsrD Awesome blog article.Really thank you! Will read on...

mjqvjocj@gmail.com wrote re: Setting up TeamCity as a native NuGet Server
on 08-18-2014 6:01 AM

My partner and i discovered many significant things through your submit. I might like to express there might be a circumstance where you will get a mortgage loan and do not have to have a co-signer say for example a Authorities Pupil Assist Mortgage loan. But when you are getting any applying for arrangement by way of a standard creditor you will want to make ready to have a co-signer ready to make it less difficult for you. Lenders are likely to base any kind of decision over a couple of issues nevertheless the primary you will turn out to be credit score. There are some loan providers which will in addition take a look at career background make a decision based on this kind of but in most cases it'll hinge on the score.

john wrote re: Setting up TeamCity as a native NuGet Server
on 10-03-2014 10:27 AM
john wrote re: Setting up TeamCity as a native NuGet Server
on 10-15-2014 12:50 PM
crorkz wrote re: Setting up TeamCity as a native NuGet Server
on 10-21-2014 12:20 AM

UYXSb6 This web site is mostly a walk-via for all the information you needed about this and didn't know who to ask. Glimpse right here, and you'll definitely discover it.

mviptrust@gmail.com wrote re: Setting up TeamCity as a native NuGet Server
on 12-17-2014 10:24 AM

Hello, I log on to your blog. Your humoristic style is witty, keepup the good work! And you can look our website http://refractory-brick.com/ about refractory brick . Thank you very very much.

diamond crorkz wrote re: Setting up TeamCity as a native NuGet Server
on 12-17-2014 7:14 PM

s8xMZZ I cannot thank you enough for the blog article.Thanks Again. Awesome.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)