May the Source Be With You

The source code for the NuGet Gallery, the same code that runs, is hosted on GitHub at To obtain the source code on your machine, read the instructions in the README on that page.

These instructions are geared towards those who have some basic knowledge of Git and plan to contribute to the NuGet Gallery project. If you simply want to see the source code without futzing around with Git, you can also download a zip file:

Once you have the source code on your machine, makesure you have Visual Studio 2010 SP1 and the other prerequisites mentioned in the README (Azure SDK and NuGet) installed. Run the PowerShell script .\Build-Solution.ps1 to verify that your development environment is set up correctly. The script builds the solution and runs all the unit tests. If it succeeds, you're good to go.

When you open the solution in Visual Studio, you'll notice that there are only two projects, as shown in Figure 16.1.

The Facts project contains all the unit tests for the project.

The unit tests for the NuGet Gallery are written with the XUnit.NET Framework — a nice, clean, light, well designed framework. And I'm not just saying that because a co-author of XUnit.NET, Brad Wilson, is also a co-author of this book. He's also a developer ...

Get Professional ASP.NET MVC 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.