# NuGet / .NET

Avrea caches packages from nuget.org so that `dotnet restore` resolves from
colocated cache on repeat runs.

## On Avrea runners

NuGet is pre-configured. Your workflow needs no changes:

```yaml title="workflow.yml"
jobs:
  build:
    runs-on: avrea-ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-dotnet@v6
        with:
          dotnet-version: 8.0
      - run: dotnet restore
      - run: dotnet build --no-restore
      - run: dotnet test --no-build
```

## Manual setup

Add to your `NuGet.config`:

```xml title="NuGet.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="avrea-cache" value="https://cache.avrea.com:8443/nuget/v3/index.json" />
  </packageSources>
</configuration>
```