Skip to content
GitHub

Configure .NET

Add Depsilo's NuGet v3 index as a package source for dotnet restore.

BEFOREhttps://api.nuget.org/v3/index.json
AFTERhttp://localhost:23333/nuget/v3/index.json

NuGet uses a v3 service index; Depsilo’s route is /nuget/v3/index.json, not /nuget/.

终端窗口
dotnet nuget add source http://localhost:23333/nuget/v3/index.json -n depsilo
dotnet nuget list source

This updates the user-level NuGet.Config. A team project can keep an equivalent NuGet.Config next to the solution and use <clear /> to drop the default nuget.org source:

NuGet.Config
<configuration>
<packageSources>
<clear />
<add key="depsilo" value="http://localhost:23333/nuget/v3/index.json" />
</packageSources>
</configuration>
  1. Check that the instance is ready

    终端窗口
    curl -fsS http://localhost:23333/ready
  2. Restore a project

    终端窗口
    dotnet restore
  3. Confirm the traffic in Admin

    Check the /nuget/ requests and cache results in Access logs.