-
Notifications
You must be signed in to change notification settings - Fork 258
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
dotnet nuget push *.nupkg
doesn't push more than one file
#4393
Comments
dotnet nuget push *.nupkg
in "" doesn't push more than one filedotnet nuget push *.nupkg
doesn't push more than one file
I can confirmed this within microsoft/aspnetcore-build:1.0-1.1 At the moment, I use the following line in linux as workaround inside the above build container. |
any update on this one? seems to be still an issue on |
This is still an issue, only one nuget gets uploaded when running |
There's a bug in NuGet that causes only the first matching package to be pushed. Somehow the command works fine locally, but CI only pushes OpenWheels. Hopefully this works around that issue. Related ticket: NuGet/Home#4393
try; |
i can confirm "dotnet push **/*.nupkg" (linux slash, instead of windows backslash) basically is working. push is executed (i see my packages on NuGet.Org! BUT command ends with exitcode and the last3 output rows:
it seems that some symbol settings now are required.
|
my last post/error/finding can be solved by adding error: File does not exist (**/*.snupkg). |
Personal note: coming back to work more with NuGet (Client) after two years and i must see: i'm using core features (NuGet push) and after 2 hours of work i run into 2 open issues
This Project is the CORE of dotnet !? sorry i'm disappointed.... regards |
A solution here? And any plan to fix this? I find |
It's shocking that If you won't fix it, error out and explain why, don't proceed with broken behaviour. |
No, I'm saying that NuGet only uses a single filename, as shown by the two lines of code I linked. The operating system doesn't matter. If that filename contains a There's a misunderstanding that it's related to Windows or Linux. It's actually the shell. Scott Hanselman has a blog post which explains the difference between terminal, console and shell, which might help with the understanding. If you run a shell on Windows that does file globbing, you'll have the same problem as people "using linux". If you configure your shell on linux to stop doing globbing (or you quote Another way to look at it is to forget about nuget for a few minutes. Try out this class Program
{
void Main(string[] args)
{
System.Console.WriteLine("Number of arguments: " + args.Length);
for (int i = 0; i < args.Length; args++)
{
System.Console.WriteLine($"[{i}]: {args[i]}");
}
}
} Try running this with So, NuGet needs to be changed in the two places I linked earlier where it does |
Thanks @zivkan . I found I was misunderstanding. The issue I was facing is not a cross-platform issue but the difference of shell. To avoid the issue, I can just simply avoid globbing in bash (or another shell).
Now that I think this is not a bug in NuGet while I considered this was a bug when creating this issue. To avoid misunderstanding like me, how about adding an extra note in the NuGet document to take care of the globbing in a shell. I'm also thinking I'm going to close this issue and creating a new issue to support multiple files to push. |
I am using Linux Ubuntu builds from GitHub. My team and I ran into this several times. We haven't been able to get anything other than specifying the files directly or using xargs. Fortunately the xargs works great. We have tried several combinations .nupkg, out/.nupkg, and more. No wildcards have worked properly. What is happening is that it picks up the very first package and then doesn't do anything else. We have a handful of packages to deploy. Using *.nupkg in any combination just works only for one package. We are however able to use a command line to do a *.nupkg, pass to xargs to run dotnet nuget push. So wildcards are working on the command line, just not from dotnet nuget push. Interesting is that GitHub uses this in their workflow template for publishing .NET Core packages. I think the best thing is to get GitHub to update the workflow template. That way others will not run into this issue as much. |
I'm closing this issue with summarizing as follows. The target of this issueWhen trying to push two or more nuget files by How to solvePlease use BackgroundWhen we use If you think NuGet should support specifying two or more files, everyone can open another issue as a feature request. As this looks like a "good-to-have" feature for me, I don't file this feature request right now. |
I'm reopening this issue. Even though the original author, @tanaka-takayoshi has worked around the issue. Many others are hitting it and this issue is now the preferred tracking issue to add support into NuGet to pass multiple nupkgs on the command line. Everyone interested should keep upvoting the original post so that it appears higher in the list of all open issues sorted by upvotes. This issue should not be closed until NuGet supports multiple files passed on the command line. |
see also https://github.com/dotnet/cli/issues/5436
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): dotnet (on Linux)
NuGet version (x.x.x.xxx): seems RC4 (I have no idea to confirm it)
dotnet.exe --version (if appropriate): 1.0.0-rc4-004598
VS version (if appropriate):NA
OS version (i.e. win10 v1607 (14393.321)):RHEL 7.3
Worked before? If so, with which NuGet version:No.
Detailed repro steps so we can see the same problem
dotnet nuget push *.nupkg
Other suggested things
I expect I can push all the nupkg files.
https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/dotnet-nuget-push
Verbose Logs
Sample Project
Very helpful if you can zip a project and paste into this issue!
No need sample project.
The text was updated successfully, but these errors were encountered: