Switch branches/tags
Nothing to show
Clone or download
Latest commit 877663c Sep 20, 2018
Failed to load latest commit information.
.github (doc) add github issue templates Feb 20, 2016
.nuget seriously, if nuget fails to resolve packages - don't write that off … Oct 26, 2013
Photoshop (maint) remove integration point PSDs Sep 30, 2016
Scripts (build) ensure the call to build.bat works Jul 11, 2015
choco.wiki @ 25f20a5 (maint) Formatting changes Sep 11, 2018
chocolatey (blog) Chocolatey Fest One Month Away Sep 20, 2018
docgen Convert wiki documents to cshtml May 17, 2016
lib (GH-439) Fix markdownsharp to the right version Oct 10, 2016
nugetgallery The thanks page doesn't have a title Dec 9, 2017
.gitignore (maint) ignore UpgradeLog.htm Jul 11, 2018
.gitmodules Add wiki as submodule May 17, 2016
COPYRIGHT.txt updating licensing and gitignore Sep 30, 2012
CREDITS.txt (maint) formatting Feb 2, 2016
ChocolateyGallery.sln (maint) upgrade to VS2013 Jun 13, 2015
ChocolateyGallery.sln.DotSettings (maint) resharper team settings update Jan 15, 2017
DEVELOPER.md (GH-559) Add timestamp server Apr 27, 2018
LICENSE.txt (doc) update license Apr 27, 2018
LogoUsePolicy.md (legal) add logo use policy Jun 16, 2016
README.md Add 'getting started' instructions May 7, 2017
UpdateDocumentation.ps1 (maint) Changed command to use specific version Jun 7, 2018
build.bat adding all items from current site. Must work out the details of how … Jan 22, 2012
information.txt adding all items from current site. Must work out the details of how … Jan 22, 2012
optimizeImages.ps1 adding image optimization script Apr 11, 2013





Getting started

  1. You will need a local running instance of SQL Server and Visual Studio 2013 or above
  2. In Visual Studio, open ChocolateyGallery.sln
  3. In the Website project, open web.config
  4. Locate the connectionStrings section, and modify the NuGetGallery connection string to point to your local instance of SQL Server. It's not a bad idea to change the database name (initial catalog) just to avoid confusion. For example if your SQL Server instance is named SQL2016, you could use: <add name="NuGetGallery" connectionString="Data Source=.\SQL2016;Initial Catalog=Chocolatey;Integrated Security=SSPI;MultipleActiveResultSets=False;" providerName="System.Data.SqlClient" /> Note: the database does not need to exist
  5. Open the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console)
  6. If prompted, restore any missing NuGet packages (Don't use nuget restore from the command-line as this will pull in extra packages that cause the build to break)
  7. Run the Update-Database command in Package Manager Console (if the command is not found, try reloading the solution in Visual Studio)
  8. The database named in the connection string should now exist in your SQL Server.
  9. Press Ctrl-F5 to start the web application without debugging
  10. Your web browser should launch, showing the chocolatey home page
  11. Click Signup and enter details to create a new account
  12. To make this account an administrator, run the following SQL against your new database eg. Use SQL Server Management Studio or sqlcmd from the command line. Note: Replace 'username' with the name of the user account you just created
DECLARE @adminId int
SELECT @adminId = [Key] FROM Roles WHERE Name = 'Admins'

DECLARE @userId int
SELECT @userId = [Key] FROM Users where Username = 'username'

INSERT INTO UserRoles(UserKey, RoleKey) VALUES(@userId, @adminId)
  1. You should now be up and running!

Known issues

When debugging, you might see this exception: SimpleInjector.ActivationException: 'The given type IControllerActivator is not a concrete type. Please use one of the other overloads to register this type.'. Just ignore this and keep running.

Leave items as they are in the nugetgallery folder

  1. Please don't fix anything in the nugetgallery folder or subfolder. Instead you should copy the unchanged item over to chocolatey/Website.
  2. Then remove the old item from the Visual Studio project and add the newly copied item to the project.
  3. Save the project and commit your changes.
  4. Make your changes as normal now.