Installation Guide

🎯 What You'll Learn

📚 Prerequisites

🚀 Quick Start

If you already have .NET installed, getting CurlDotNet is just one command:

dotnet add package CurlDotNet

That's it! Jump to Verify Installation to confirm everything works.

📦 Step-by-Step Installation

Step 1: Install .NET SDK

CurlDotNet requires .NET. Here's how to install it on your platform:

Windows

Option 1: Official Installer (Recommended)

  1. Visit dotnet.microsoft.com/download
  2. Download the .NET SDK (not just the runtime)
  3. Run the installer
  4. Click through the wizard (defaults are fine)
  5. Restart your terminal/command prompt

Option 2: Windows Package Manager (winget)

winget install Microsoft.DotNet.SDK.8

Option 3: Chocolatey

choco install dotnet-sdk

macOS

Option 1: Official Installer (Recommended)

  1. Visit dotnet.microsoft.com/download
  2. Download the .NET SDK for macOS
  3. Open the .pkg file
  4. Follow the installation wizard
  5. Restart your terminal

Option 2: Homebrew

brew install --cask dotnet-sdk

Linux (Ubuntu/Debian)

# Add Microsoft package repository
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

# Install .NET SDK
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0

Linux (Fedora/RHEL/CentOS)

# Add Microsoft package repository
sudo dnf install dotnet-sdk-8.0

Linux (Arch)

sudo pacman -S dotnet-sdk

Linux (Other Distributions)

See the official .NET installation guide for your specific distribution.

Step 2: Verify .NET Installation

Open a terminal/command prompt and run:

dotnet --version

You should see a version number like 8.0.100 or 10.0.0. If you get an error, restart your terminal or check the .NET installation troubleshooting guide.

Step 3: Create a New Project

# Create a directory for your project
mkdir MyCurlApp
cd MyCurlApp

# Create a new console application
dotnet new console

# Verify the project was created
ls

You should see:

Step 4: Install CurlDotNet Package

Now install CurlDotNet using one of these methods:

Option 1: .NET CLI (Recommended)

dotnet add package CurlDotNet

Option 2: NuGet Package Manager (Visual Studio)

  1. Right-click on your project in Solution Explorer
  2. Select "Manage NuGet Packages"
  3. Search for "CurlDotNet"
  4. Click "Install"

Option 3: Package Manager Console (Visual Studio)

Install-Package CurlDotNet

Option 4: Manual PackageReference

Edit your .csproj file and add:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CurlDotNet" Version="1.0.0" />
  </ItemGroup>
</Project>

Then run:

dotnet restore

Step 5: Verify CurlDotNet Installation

Create a simple test file to verify everything works:

using System;
using System.Threading.Tasks;
using CurlDotNet;

class Program
{
    static async Task Main(string[] args)
    {
        Console.WriteLine("Testing CurlDotNet installation...\n");

        try
        {
            var result = await Curl.ExecuteAsync("curl https://httpbin.org/status/200");

            if (result.IsSuccess)
            {
                Console.WriteLine("✓ CurlDotNet is working correctly!");
                Console.WriteLine($"✓ Status Code: {result.StatusCode}");
                Console.WriteLine($"✓ .NET Version: {Environment.Version}");
            }
            else
            {
                Console.WriteLine($"✗ Unexpected status: {result.StatusCode}");
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"✗ Error: {ex.Message}");
        }
    }
}

Run it:

dotnet run

You should see:

Testing CurlDotNet installation...

✓ CurlDotNet is working correctly!
✓ Status Code: 200
✓ .NET Version: 8.0.0

If you see this, congratulations! CurlDotNet is installed and working.

🔧 IDE and Editor Setup

Visual Studio 2022 (Windows/Mac)

Installation:

  1. Download from visualstudio.microsoft.com
  2. During installation, select ".NET desktop development" workload
  3. Install CurlDotNet via NuGet Package Manager

Creating a project:

  1. File → New → Project
  2. Select "Console App (.NET)"
  3. Name your project
  4. Right-click project → Manage NuGet Packages
  5. Search "CurlDotNet" and install

Visual Studio Code (Cross-Platform)

Installation:

  1. Download from code.visualstudio.com
  2. Install the C# extension (by Microsoft)
  3. Install the C# Dev Kit extension (optional but recommended)

Creating a project:

dotnet new console -n MyCurlApp
cd MyCurlApp
dotnet add package CurlDotNet
code .

Running in VS Code:

JetBrains Rider (Cross-Platform)

Installation:

  1. Download from jetbrains.com/rider
  2. Install and open Rider
  3. Create new solution or open existing

Adding CurlDotNet:

  1. Right-click project → Manage NuGet Packages
  2. Search "CurlDotNet"
  3. Click Install

Command Line / Terminal Only

You don't need an IDE! You can use any text editor:

# Create project
dotnet new console
dotnet add package CurlDotNet

# Edit with your favorite editor
nano Program.cs
# or
vim Program.cs
# or
code Program.cs

# Build and run
dotnet run

🎯 Platform-Specific Notes

Windows

Supported Versions:

Requirements:

Common Issues:

macOS

Supported Versions:

Requirements:

Common Issues:

Linux

Supported Distributions:

Requirements:

Common Issues:

Docker / Containers

Dockerfile example:

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app

# Copy and restore
COPY *.csproj ./
RUN dotnet restore

# Copy everything and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/runtime:8.0
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "MyCurlApp.dll"]

Building and running:

docker build -t mycurlapp .
docker run mycurlapp

Azure Functions / App Service

Installation via portal:

  1. Create Azure Function or App Service
  2. Select .NET 8.0 runtime
  3. Add CurlDotNet to your project dependencies

Local development:

# Install Azure Functions Core Tools
npm install -g azure-functions-core-tools@4

# Create function app
func init MyFunctionApp --dotnet
cd MyFunctionApp
dotnet add package CurlDotNet

# Create function
func new --name MyHttpTrigger --template "HTTP trigger"

# Run locally
func start

📋 Version Compatibility

.NET Target Frameworks

CurlDotNet supports these .NET versions:

Target Framework Support Status Recommended
.NET 10.0 ✅ Fully Supported Yes
.NET 8.0 (LTS) ✅ Fully Supported Best Choice
.NET 6.0 (LTS) ✅ Fully Supported Yes
.NET 5.0 ✅ Supported No (EOL)
.NET Core 3.1 ✅ Supported No (EOL)
.NET Core 2.0+ ✅ Via .NET Standard 2.0 Legacy only
.NET Framework 4.7.2+ ✅ Via .NET Standard 2.0 Windows only
.NET Standard 2.0 ✅ Fully Supported Maximum compatibility

Recommendation: Use .NET 8.0 (current LTS) for new projects.

CurlDotNet Versions

# Install latest version (recommended)
dotnet add package CurlDotNet

# Install specific version
dotnet add package CurlDotNet --version 1.0.0

# Update to latest
dotnet add package CurlDotNet

Version History:

🔍 Troubleshooting Installation

Problem: "dotnet: command not found"

On Windows:

  1. Restart your command prompt/terminal
  2. Check if .NET is in PATH: echo %PATH%
  3. Manually add to PATH if needed: C:\Program Files\dotnet

On macOS/Linux:

  1. Restart your terminal
  2. Check PATH: echo $PATH
  3. Add to PATH: export PATH=$PATH:/usr/local/share/dotnet
  4. Add to shell profile: echo 'export PATH=$PATH:/usr/local/share/dotnet' >> ~/.bashrc

For more details, see the troubleshooting guide.

Problem: "Package 'CurlDotNet' not found"

Solution:

# Update NuGet sources
dotnet nuget list source

# Add NuGet.org if missing
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org

# Clear cache and retry
dotnet nuget locals all --clear
dotnet restore
dotnet add package CurlDotNet

For more details, see the troubleshooting guide.

Problem: "The target framework 'netX.X' is not supported"

Solution:

# Check your .NET version
dotnet --version

# Update your project's target framework in .csproj
# Change from:
<TargetFramework>net5.0</TargetFramework>
# To:
<TargetFramework>net8.0</TargetFramework>

# Or for maximum compatibility:
<TargetFramework>netstandard2.0</TargetFramework>

Problem: "SDK not found" or "A compatible SDK version was not found"

Solution:

  1. Install .NET SDK (not just runtime)
  2. Check installed SDKs: dotnet --list-sdks
  3. If empty, reinstall .NET SDK from dotnet.microsoft.com

For more details, see the troubleshooting guide.

Problem: SSL/TLS Errors on First Run

On Windows:

# Update certificates
certutil -generateSSTFromWU roots.sst

On macOS:

# Update certificates
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain > /dev/null

On Linux:

# Update CA certificates
sudo apt-get update
sudo apt-get install --reinstall ca-certificates

For more details, see the troubleshooting guide.

Problem: Permission Errors

On Windows: Run terminal as Administrator

On macOS/Linux:

# Don't use sudo for dotnet commands
# Instead, fix permissions:
sudo chown -R $USER ~/.dotnet
sudo chown -R $USER ~/.nuget

🎓 Next Steps

Now that CurlDotNet is installed:

  1. Try it outYour First Request
  2. Learn the basicsTutorials
  3. Explore recipesCookbook
  4. Read API docsAPI Guide

📚 Additional Resources

Official Documentation

Getting Help

Learning Resources

🎯 Quick Reference

# Install .NET SDK
# Visit: https://dotnet.microsoft.com/download

# Verify installation
dotnet --version

# Create new project
dotnet new console -n MyCurlApp
cd MyCurlApp

# Add CurlDotNet
dotnet add package CurlDotNet

# Run your app
dotnet run

# Build for production
dotnet publish -c Release

✅ Installation Checklist

Before continuing, make sure:

If all boxes are checked, you're ready to start building with CurlDotNet!


Ready to make your first request?Your First Request

Need help? Check the Troubleshooting Guide or ask in Discussions

About This Documentation

💎 Sponsored by IronSoftware - Enterprise .NET components trusted by thousands of developers worldwide.

✍️ Written by Jacob Mellor, CTO at IronSoftware.

📦 Get CurlDotNet: NuGet Package | GitHub Repository