.NET
Overview
.NET is a platform for building applications using C#, F#, and Visual Basic. It uses NuGet as its package manager for sharing and consuming reusable code packages.
Integrating .NET with JFrog Fly allows you to manage your packages and releases from source code to production in a simple and native way, directly from your IDE.
Supported Clients
JFrog Fly supports .NET packages with:
dotnet CLI (
dotnet nuget push,dotnet restore) - The modern .NET command-line interfaceNuGet CLI (
nuget push,nuget restore) - The standalone NuGet command-line tool
Upload / Push Package
With Fly App
Activate .NET in your Fly App to configure .NET globally with Fly. The Fly App sets the Fly registry as the default push source, so you can push without specifying --source:
Using dotnet CLI:
dotnet nuget push <package>.nupkgUsing NuGet CLI:
nuget push <package>.nupkgManual Configuration
1. Generate an access token in Fly Token Management
2. Configure .NET:
Using dotnet CLI:
dotnet nuget add source https://<your-fly-subdomain>.jfrog.io/artifactory/api/nuget/nuget \
--name Fly \
--username <your-fly-username> \
--password <your-fly-token> \
--store-password-in-clear-textUsing NuGet CLI:
nuget sources add -Name Fly \
-Source https://<your-fly-subdomain>.jfrog.io/artifactory/api/nuget/nuget \
-Username <your-fly-username> \
-Password <your-fly-token>3. Push package:
Using dotnet CLI:
dotnet nuget push <package>.nupkg --source FlyUsing NuGet CLI:
nuget push <package>.nupkg -Source FlyDownload / Restore Package
With Fly App
Activate .NET in your Fly App to configure .NET globally with Fly, then restore as usual:
Using dotnet CLI:
dotnet restoreUsing NuGet CLI:
nuget restoreManual Configuration
1. Generate an access token in Fly Token Management
2. Configure .NET:
Using dotnet CLI:
dotnet nuget add source https://<your-fly-subdomain>.jfrog.io/artifactory/api/nuget/nuget \
--name Fly \
--username <your-fly-username> \
--password <your-fly-token> \
--store-password-in-clear-textUsing NuGet CLI:
nuget sources add -Name Fly \
-Source https://<your-fly-subdomain>.jfrog.io/artifactory/api/nuget/nuget \
-Username <your-fly-username> \
-Password <your-fly-token>3. Restore packages:
Using dotnet CLI:
dotnet restoreUsing NuGet CLI:
nuget restoreFrom Public Registry
When you restore a package that isn’t in your Fly Registry, JFrog Fly automatically fetches it from nuget.org and caches it for future use.
Using dotnet CLI:
dotnet restoreUsing NuGet CLI:
nuget restoreUpload/Download Packages with CI
To push and restore .NET packages with CI, update your GitHub Actions workflow to include the Fly action.
Simply type in your IDE the prompt: “Configure my workflows with Fly” and Fly MCP will configure your GitHub Actions workflow yml file, as follows:
1. Add permissions (top level, after on:):
permissions:
contents: read
id-token: write2. Add Fly Action (after actions/setup-dotnet, before dotnet/nuget commands):
- name: JFrog Fly - Configure all your package managers to work with Fly registry
uses: jfrog/fly-action@v1
with:
url: https://<your-fly-subdomain>.jfrog.ioGitHub Action Example
name: Build and Publish .NET Package
on:
push:
branches: [main]
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0'
- name: JFrog Fly - Configure all your package managers to work with Fly registry
uses: jfrog/fly-action@v1
with:
url: https://<your-fly-subdomain>.jfrog.io
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release
- name: Push package
run: dotnet nuget push ./bin/Release/*.nupkgBack to Package Types →