Skip to content

NuGet 6.9 renamed no-cache to no-http-cache and deprecated the old setting name #4412

Closed

Description

@mikkelbu

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

5.0

Operating system

Linux, Windows, macOS, FreeBSD

Operating system architecture

x64

CI Server

GitHub Actions

What are you seeing?

In Nuget 6.9 no-cache was renamed to no-http-cache and the old setting was deprecated - see e.g. NuGet/Home#9180 for more information.

Using cake 5 with NoCache set to true - https://github.com/nunit/NUnit.Cake.Recipe/actions/runs/12497571350/job/34870318505

var installSettings = new NuGetInstallSettings
{
    Source = new [] {
    BuildSettings.PackageDirectory,
        "https://www.myget.org/F/nunit/api/v3/index.json",
        "https://api.nuget.org/v3/index.json"
    },
    Version = PackageVersion,
    OutputDirectory = PackageInstallDirectory,
    //ExcludeVersion = true,
    Prerelease = true,
    NoCache = true,
    Verbosity = BuildSettings.NuGetVerbosity
};

then one gets a warning about this deprecation in the logs

...
NoCache is deprecated and has been renamed to NoHttpCache. Please use NoHttpCache instead.
...

What is expected?

I don't know if cake has any idea of the underlying version of NuGet, but if it don't then perhaps it should be possible to set both NoCache and a new NoHttpCache in a period to support both old and new clients until NuGet removes the old setting.

Steps to Reproduce

See GitHub Action runs in https://github.com/nunit/NUnit.Cake.Recipe/ - e.g. https://github.com/nunit/NUnit.Cake.Recipe/actions/runs/12497582973/job/34870345197

Output log

From https://github.com/nunit/NUnit.Cake.Recipe/actions/runs/12497582973/job/34870345197

...
---------------------------------------------------
Installing NUnit.Cake.Recipe.1.3.0-pr00050.16.nupkg
---------------------------------------------------
NoCache is deprecated and has been renamed to NoHttpCache. Please use NoHttpCache instead.
Feeds used:
  /home/runner/work/NUnit.Cake.Recipe/NUnit.Cake.Recipe/package/
  https://www.myget.org/F/nunit/api/v3/index.json
  https://api.nuget.org/v3/index.json

Activity

  1. added this to the v5.1.0 milestone on Jan 15, 2025
  2. self-assigned this
    on Jan 15, 2025
  3. added 2 commits that reference this issue on Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions