Skip to content

Pushing a snupkg with an invalid Symbol Server should error better than "File not found" #9909

Open
@McMlok

Description

@McMlok

Details about Problem

When I try to push a *.snupkg to our corporate nexus server it fail with the file not found error. But the file is on a mentioned path and I can open it with winzip. I try it via Nuget.exe and with dotnet.exe with the same result. When I push standard nupkg everything works fine on V2 and also for V3 protokol.

Nuget.exe and dotnet.exe

NuGet version: 5.6.0, 5.7.0 5.8.0-preview.1

dotnet.exe --version (if appropriate):3.1.401

VS version (if appropriate): 16.7.1

OS version: Windows 10 1809

Worked before? If so, with which NuGet version: No it's my first try to push symbols to our corporate nexus feed.

Detailed repro steps so we can see the same problem

  1. dotnet new classlib
  2. dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
  3. nuget push C:\FULL_PATH_TO_PROJECT\bin\Debug\TestLibrary.1.0.0.snupkg -Source CorporateNexus -SymbolSource CorporateNexus -verbosity detailed -ForceEnglishOutput

...

Verbose Logs

nuget push C:\FULL_PATH_TO_PROJECT\bin\Debug\TestLibrary.1.0.0.snupkg -Source CorporateNexus -SymbolSource CorporateNexus -verbosity detailed  -ForceEnglishOutput
NuGet Version: 5.6.0.6591
File does not exist (C:\FULL_PATH_TO_PROJECT\bin\Debug\TestLibrary.1.0.0.snupkg).
System.ArgumentException: File does not exist (C:\FULL_PATH_TO_PROJECT\TestLibrary\bin\Debug\KB.TestLibrary.1.0.0.snupkg).
   at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushSymbols>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.Core.Types.PackageUpdateResource.<Push>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.PushRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.CommandLine.Command.Execute()
   at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)

What I did wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions