Publishing Boxstarter Packages
How to make your packages discoverable to Boxstarter and possibly share them with others
There are several options available as to where to publish your packages:
- Keep them in your local Boxstarter repository
- Push them to a public Nuget feed like Chocolatey.org, the Boxstarter community MyGet.org feed or any other public feed
- Push to a private Nuget feed
- Keep packages on a network share
Where does Boxstarter look for Packages
Boxstarter can be configured to look anywhere for packages. By default, Boxstarter checks the following locations in this order:
- The Boxstarter Local Repository
$Boxstarter.LocalRepowhere packages are saved using
- The Chocolatey.org public feed
- The Boxstarter Community feed hosted on MyGet.org
The first location that contains a package name that Boxstarter is looking for will be the last location Boxstarter probes. So, for example, if the local repository and the MyGet feed have a package with the same name, the package in the local repository will be chosen.
Configuring where Boxstarter looks for packages
You can change the directory that Boxstarter considers the local repository or change the feeds that Boxstarter searches using the
Set-BoxstarterConfig -LocalRepo "\\server\share\myRepo"
This will cause Boxstarter to search for packages in \\server\share\myRepo
Set-BoxstarterConfig -NugetSources "http://www.myget.org/F/MyNugetFeed/api/v2"
This will cause Boxstarter to search for packages in the local repository and then in your MyNugetFeed hosted by MyGet.org. No other feed will be searched.
Set-BoxstarterConfig -NugetSources "http://www.myget.org/F/MyNugetFeed/api/v2;https://chocolatey.org/api/v2;http://www.myget.org/F/boxstarter/api/v2"
This will cause Boxstarter to search for packages in the local repository and then in your MyNugetFeed followed by the Chocolatey.org feed and then the Boxstarter community feed on MyGet.
Pushing packages to a feed
Boxstarter does not provide any functionality for publishing packages to a Nuget feed. However, you can use nuget.exe which does provide this capability. You can obtain the nuget.exe command line interface by installing the nuget.commandline package. Calling the Nuget command line with the Push command and the feed URL will publish your package to that feed.
nuget" push MyPackage.1.0.0.nupkg <Your MyGet API Key> -Source https://www.myget.org/F/boxstarter/api/v2/package
If you want to publish to the Chocolatey feed, Chocolatey has a command, choco push, which will publish your package to Chocolatey without needing to specify the feed URL.
cpush MyPackage.1.0.0.nupkg <Your Chocolatey API Key>
All Nuget feed hosts require package authors to provide a key when publishing packages. This identifies you as the actual package owner. See the host's documentation for information on how to obtain a key.