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

[Bug]: nuget.exe install packages.config does not honor -PackageSaveMode nuspec #11018

Closed
huangqinjin opened this issue Jul 11, 2021 · 0 comments · Fixed by NuGet/NuGet.Client#4193
Labels
Community PRs (and linked Issues) created by someone not in the NuGet team Product:NuGet.exe NuGet.exe Type:Bug

Comments

@huangqinjin
Copy link

huangqinjin commented Jul 11, 2021

NuGet Product Used

NuGet.exe

Product Version

5.10.0.7240

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Newtonsoft.Json" version="13.0.1" />
</packages>
  1. nuget install packages.config -PackageSaveMode nuspec

What I expected:

Newtonsoft.Json.nuspec in folder Newtonsoft.Json.13.0.1.

What I got:

Newtonsoft.Json.13.0.1.nupkg in folder Newtonsoft.Json.13.0.1.

Verbose Logs

PS C:\Users\huangqinjin\Projects\test> nuget install packages.config -PackageSaveMode nuspec
Feeds used:
  C:\Users\huangqinjin\.nuget\packages\
  https://api.nuget.org/v3/index.json
  https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
  C:\Users\huangqinjin\Projects\NuGet

Restoring NuGet package Newtonsoft.Json.13.0.1.
Adding package 'Newtonsoft.Json.13.0.1' to folder 'C:\Users\huangqinjin\Projects\test'
Added package 'Newtonsoft.Json.13.0.1' to folder 'C:\Users\huangqinjin\Projects\test'
PS C:\Users\huangqinjin\Projects\test> Get-ChildItem Newtonsoft.Json.13.0.1 -Name
lib
.signature.p7s
LICENSE.md
Newtonsoft.Json.13.0.1.nupkg
packageIcon.png
PS C:\Users\huangqinjin\Projects\test> Remove-Item -Recurse Newtonsoft.Json.13.0.1
PS C:\Users\huangqinjin\Projects\test> nuget install Newtonsoft.Json -Version 13.0.1 -PackageSaveMode nuspec
Feeds used:
  C:\Users\huangqinjin\.nuget\packages\
  https://api.nuget.org/v3/index.json
  https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
  C:\Users\huangqinjin\Projects\NuGet



Attempting to gather dependency information for package 'Newtonsoft.Json.13.0.1' with respect to project 'C:\Users\huangqinjin\Projects\test', targeting 'Any,Version=v0.0'
Gathering dependency information took 2.32 sec
Attempting to resolve dependencies for package 'Newtonsoft.Json.13.0.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Newtonsoft.Json.13.0.1'
Resolved actions to install package 'Newtonsoft.Json.13.0.1'
Retrieving package 'Newtonsoft.Json 13.0.1' from 'C:\Users\huangqinjin\.nuget\packages\'.
Adding package 'Newtonsoft.Json.13.0.1' to folder 'C:\Users\huangqinjin\Projects\test'
Added package 'Newtonsoft.Json.13.0.1' to folder 'C:\Users\huangqinjin\Projects\test'
Successfully installed 'Newtonsoft.Json 13.0.1' to C:\Users\huangqinjin\Projects\test
Executing nuget actions took 329 ms
PS C:\Users\huangqinjin\Projects\test> Get-ChildItem Newtonsoft.Json.13.0.1 -Name
lib
.signature.p7s
LICENSE.md
Newtonsoft.Json.nuspec
packageIcon.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PRs (and linked Issues) created by someone not in the NuGet team Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants