Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
mikkelbu opened this issue Dec 26, 2024 · 0 comments · Fixed by #4451
Closed
2 tasks done

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

mikkelbu opened this issue Dec 26, 2024 · 0 comments · Fixed by #4451
Assignees
Milestone

Comments

@mikkelbu
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants