NuGet Gallery — Where packages are found
First install prerequisites:
- Visual Studio 2019 - Install the following
- ASP.NET and web development
- Azure development
- PowerShell 4.0
- SQL Server 2016 (with DB engine version 13.0 or greater)
Now run the NuGet Gallery:
- Clone the repository with
git clone https://github.com/NuGet/NuGetGallery.git
- Navigate to
- Build with
- Create the database and enable HTTPS with
.\NuGetGallery.slnusing Visual Studio
- Ensure the
NuGetGalleryproject is the StartUp Project and press
F5to run the site
Refer to our documentation for information on how to develop the frontend, use AAD, and more.
You will find instructions on how to deploy the Gallery to Azure here.
After you succeed in running the NuGet Gallery, you can create a publish profile to deploy locally (such as your local Windows computer).
The steps are:
- Select the
NuGetGalleryproject in Solution Explore of Visual Studio.
- Right click the project, and then click
Publishin the pop-up menu. Create a publish profile and make sure the Target is set to
- Copy the contents of the
Target Locationto any folder you want. For the following example, assume the folder is
- Execute the command below to start the web app (note that the parameter
/pathof iisexpress.exe only supports absolute paths on Windows).
"C:\Program Files\IIS Express\iisexpress.exe" /path:C:\ContosoSoftware\NuGetGallery
Now you can access the local website with a web browser. The URL is
After you deploy it, you don't need using Visual Studio to run it anymore.
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.
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 .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.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
This is the Git workflow we're currently using:
Clone and checkout the
Visual Studio may modify the
applicationhost.config file. You can force git to ignore changes to this file
git update-index --assume-unchanged .vs/config/applicationhost.config
You can undo this with this command:
git update-index --no-assume-unchanged .vs/config/applicationhost.config
This should help prevent unwanted file commits.
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 dev git pull dev
Create a topic branch to do your work. You must work in topic branches to help us keep our features isolated and easily moved between branches. Our policy is to start all topic branches off of the 'dev' branch. Branch names should use the following format '[user]-[bugnumber]'. If there is no bug yet, create one and assign it to yourself!
git checkout dev git checkout -b anurse-123
Do your work. Now, do your work using the following highly accurate and efficient algorithm :)
Test your changes (you're practicing TDD, right?)
Add your changes to git's index.
git add -A
Commit your changes.
git commit -m "<description of work>"
if (moreWorkToDo) go to #3.1 else go to #4.
Start a code review. Start a code review by pushing your branch up to GitHub (
git push origin anurse-123) and creating a Pull Request from your branch to dev. Wait for at least someone on the team to respond with: "" (that's called the "Ship-It Squirrel" and you can put it in your own comments by typing
Merge your changes in to dev. Click the bright green "Merge" button on your pull request! Don't forget to delete the branch afterwards to keep our repo clean.
If there isn't a bright green button... well, you'll have to do some more complicated merging:
git checkout dev git pull origin dev git merge anurse-123 ... resolve conflicts ... git push origin dev
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!