Once you have signed up for a Gemfury account, you can upload and install NuGet packages.
Uploading packages
There are a few guides on the web about creating a NuGet package. Once you have the package file, you can use the Dashboard, command line, or cURL to upload it to your Gemfury account.
Your secret Repository URL
The secret repository URL is the NuGet endpoint for your Gemfury account and packages. Do not share this URL to keep your account private. Your Repo-URL has the following format:
https://nuget.fury.io/TOKEN/USERNAME/
Setting up Visual Studio with Gemfury
To install your packages, you’ll need to configure NuGet to access your Gemfury repository by performing the following steps:
- Go to Tools → NuGet Package Manager → Package Manager Settings
- Select NuGet Package Manager → Package Sources in the navigation tree
- Enter “Gemfury” into the Name field and your NuGet Repo-URL into the Source field, and press Add
- (Optional) Use the arrow buttons to move the “Gemfury” source to the first spot to prioritize your packages over the ones in the public repository.
Installing packages using Visual Studio
To install packages from your Gemfury repository, perform the following steps:
- Go to Project → Manage NuGet Packages
- In Package Source select the “Gemfury” entry
- Select desired package and specific version, then click
Install
- After which,
Build
your project. If needed, Visual Studio performs a restore of NuGet packages as part of the build steps.
Using NuGet command line tool with Gemfury
Append the -Source
option to your NuGet.exe commands to
access your private packages in Gemfury:
nuget <command> -Source https://nuget.fury.io/TOKEN/USERNAME/
List the current versions for your private packages:
nuget list -Source https://nuget.fury.io/TOKEN/USERNAME/
Install a package:
nuget install ZeroClipboard -Source https://nuget.fury.io/TOKEN/USERNAME/
Using dotnet command line tool with Gemfury
You may use the dotnet
CLI tool to restore packages of an existing solution
or project.
To achieve this, execute the following command from either the solution or the project directory:
dotnet restore
Note, executing from a solution directory, will perform the restore in every project that is part of the solution.
You can add a private package from your private repository:
dotnet add package ZeroClipboard -Source https://nuget.fury.io/TOKEN/USERNAME/
Or, remove a package from your project:
dotnet remove package ZeroClipboard
Configure Gemfury as a source in NuGet
Add as a source:
nuget sources add -Name fury -Source https://nuget.fury.io/TOKEN/USERNAME/
This will add your NuGet repo url in the user-specific list of package sources, which is available in all projects by that user.
You may learn more about managing NuGet sources from the official help page.
Configure Gemfury as a project specific source in NuGet
NuGet has support for custom config files, and may be used to configure project specific NuGet settings.
To add as a source specific to a project:
nuget sources add -Name fury -Source https://nuget.fury.io/TOKEN/USERNAME/ -ConfigFile ProjectDir\NuGet.Config
Where ProjectDir
is the root directory of your project. Make sure the name of
the config file is NuGet.Config
.
You may learn more about this feature from the official help page.
βeta notes
Currently, Gemfury does not support NuGet’s search or pre-release capabilities
via the -Filter
and -Prerelease
options in the NuGet.exe
or Package Manager Console. Please contact us
if this limits your ability to use Gemfury with your project.