Skip to content
The NuGet Gallery
C# JavaScript CSS PowerShell ASP HTML Other
Latest commit f2fc834 May 26, 2016 @xavierdecoster xavierdecoster Merge branch 'dev'
Failed to load latest commit information.
.github clean up root folder Mar 31, 2016
.nuget Injected Glimpse runtime policies again Aug 7, 2015
.vs/config Revert changes in applicationhost.config Oct 9, 2015
build Removing obsolete Kudu deploy scripts Feb 29, 2016
content Fixed typo (#3003) Apr 22, 2016
docs correct list formating Jun 9, 2014
ops update copyright info May 27, 2015
src Support non-enterprise versions of SqlServer for last added migrations May 26, 2016
tests Enforce administrators to a specific authentication mechanism (#3041) May 26, 2016
tools Fixing typo in makecert path May 13, 2016
.gitattributes Trying out a new gitattributes... Dec 9, 2013
.gitignore support request feature Feb 17, 2016 Update May 21, 2014
COPYRIGHT.txt update copyright info May 27, 2015
CREDITS.txt update copyright info May 27, 2015 Update Mar 7, 2014
LICENSE.txt Update LICENSE.txt Jun 4, 2015
NuGet.Cloud.targets Added Octopus Packaging Apr 11, 2014
NuGet.config Upgrade to Azure SDK 2.7 & VS2015 Jul 29, 2015
NuGetGallery.sln Injected Glimpse runtime policies again Aug 7, 2015
NuGetGallery.sln.DotSettings minor formatting cleanup + ensure controllers are all partial (requir… Jun 24, 2015 Updating README - Some more details (#3029) May 13, 2016
Repository.props Renamed some things for consistency and added new Repository boilerplate Apr 11, 2014
appveyor.yml Add AppVeyor CI config #2715 Oct 6, 2015
build.cmd Errors running build file #2911 Feb 29, 2016
build.msbuild Compile Razor views during build to trap compilation errors Dec 23, 2015
ops.cmd Restored Gallery Operations to working order Aug 5, 2013

NuGet Gallery — Where packages are found

Build status

This is an implementation of the NuGet Gallery and API. This serves as the back-end and community website for the NuGet client. For information about the NuGet project, visit the Home repository.

Build and Run the Gallery in (arbitrary number) easy steps

  1. Prerequisites. Install these if you don't already have them:
    1. Visual Studio 2015 - Custom install so that you may also install Microsoft SQL Server Data Tools. This will provide the LocalDB that Windows Azure SDK requires.
    2. PowerShell 2.0 (comes with Windows 7+)
    3. NuGet
    4. Windows Azure SDK - Note that you may have to manually upgrade the ".Cloud" projects in the solution if a different SDK version is used.
  2. Clone it!

    git clone

  3. Build it!

    cd NuGetGallery

    You may have to add the directory containing msbuild.exe to your PATH variable, %programfiles(x86)%\MSBuild\14.0\Bin\amd64 on 64-bit machines.

  4. Set up the website in IIS Express!

    1. We highly recommend using IIS Express. Use the Web Platform Installer to install it if you don't have it already (it comes with recent versions of VS and WebMatrix though). Make sure to at least once run IIS Express as an administrator.
    2. In an ADMIN powershell prompt, run the .\tools\Enable-LocalTestMe.ps1 file. It allows non-admins to host websites at: http(s)://, it configures an IIS Express site at that URL and creates a self-signed SSL certificate. For more information on, check out
    3. If you're having trouble, go to the Project Properties for the Website project, click on the Web tab and change the URL to localhost:port where port is some port number above 1024.
    4. When running the application using the Azure Compute emulator, you may have to edit the .\src\NuGetGallery.Cloud\ServiceConfiguration.Local.cscfg file and set the certificate thumbprint for the setting SSLCertificate to the certificate thumbprint of the generated certificate from step 2. You can get a list of certificates and their thumbprints using PowerShell, running Get-ChildItem -path cert:\LocalMachine\My.
  5. Create the Database!

    1. Open Visual Studio 2015
    2. Open the Package Manager Console window
    3. Ensure that the Default Project is set to NuGetGallery
    4. Open the NuGetGallery.sln solution from the root of this repository. Important: Make sure the Package Manager Console has been opened once before you open the solution. If the solution was already open, open the package manager console and then close and re-open the solution (from the file menu)
    5. Run the following command in the Package Manager Console:

      Update-Database -StartUpProjectName NuGetGallery -ConfigurationTypeName MigrationsConfiguration

      If this fails, you are likely to get more useful output by passing -Debug than -Verbose.

  6. When working with the gallery, e-mail messages are saved to the file system (under ~/App_Data).

    • To change this to use an SMTP server, edit src\NuGetGallery\Web.Config and add a Gallery.SmtpUri setting. Its value should be an SMTP connection string, for example smtp://user:password@smtpservername:25.
    • To turn off e-mail confirmations, edit src\NuGetGallery\Web.Config and change the value of Gallery.ConfirmEmailAddresses to false.
  7. Ensure the 'NuGetGallery' project (under the Frontend folder) is set to the Startup Project

That's it! You should now be able to press Ctrl-F5 to run the site!


If you find a bug with the gallery, please visit the Issue tracker and create an issue. If you're feeling generous, please search to see if the issue is already logged before creating a new one.

When creating an issue, clearly explain

  • What you were trying to do.
  • What you expected to happen.
  • What actually happened.
  • Steps to reproduce the problem.

Also include any information you think is relevant to reproducing the problem such as the browser version you used. Does it happen when you switch browsers. And so on.

Submit a patch

Before starting work on an issue, either create an issue or comment on an existing issue to ensure that we're all communicating. We have a list of items that are up for grabs and you can start working on (but always ping us beforehand).

To contribute to the gallery, make sure to create a fork first. Make your changes in the fork following the Git Workflow. When you are done with your changes, send us a pull request.

Copyright and License

Copyright .NET Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The Git Workflow

This is the Git workflow we're currently using:

Setting up

  1. Clone and checkout the following branches (to make sure local copies are made): 'master'.

When starting a new feature/unit of work.

  1. Pull the latest. Begin by pulling to make sure you are up-to-date before creating a branch to do your work This assumes you have no local commits that haven't yet been pushed (i.e., that you were previously up-to-date with origin).

    git checkout master
    git pull master
  2. Create a topic branch to do your work. You must work in topic branches, in order to help us keep our features isolated and easily moved between branches. Our policy is to start all topic branches off of the 'master' branch. Branch names should use the following format '[user]-[bugnumber]-[shortdescription]'. If there is no bug yet, create one and assign it to yourself!

    git checkout master
    git checkout -b anurse-123-makesuckless
  3. Do your work. Now, do your work using the following highly accurate and efficient algorithm :)

    1. Make changes.
    2. Test your changes (you're practicing TDD, right?)
    3. Add your changes to git's index.

      git add -A
    4. Commit your changes.

      git commit -m "<description of work>"
    5. if (moreWorkToDo) go to #3.1 else go to #4.

  4. Start a code review. Start a code review by pushing your branch up to GitHub (git push origin anurse-123-makesuckless) and creating a Pull Request from your branch to master. Wait for at least someone on the team to respond with: ":shipit:" (that's called the "Ship-It Squirrel" and you can put it in your own comments by typing :shipit:).

  5. Merge your changes in to master. Click the bright green "Merge" button on your pull request! NOTE: DO NOT DELETE THE TOPIC BRANCH!!

    If there isn't a bright green button... well, you'll have to do some more complicated merging:

    git checkout master
    git pull origin master
    git merge anurse-123-makesuckless
    ... resolve conflicts ...
    git push origin master
  6. Be ready to guide your change through QA, Staging and Prod Your change will make its way through the QA, Staging and finally Prod branches as it's deployed to the various environments. Be prepared to fix additional bugs!

Something went wrong with that request. Please try again.