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

Null Argument Passed to Path.Combine When Pushing Symbols #10645

Open
BryceBarbara opened this issue Mar 9, 2021 · 1 comment
Open

Null Argument Passed to Path.Combine When Pushing Symbols #10645

BryceBarbara opened this issue Mar 9, 2021 · 1 comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Push Platform:Xplat Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Bug

Comments

@BryceBarbara
Copy link

From what I can tell, this problem only occurs on linux.

If the Folder or project name is the same as package name, you'll get a null reference. More detail about it can be found here.

The problem code doesn't check if symbolPath is null or empty.

The simple fix would probably be

return string.IsNullOrEmpty(symbolPath) ? packageDir : Path.Combine(packageDir, symbolPath);

Details about Problem

NuGet product used: dotnet.exe

Product version: Whatever comes with .NET 5.0.201

Worked before? If so, with which NuGet version: Nope.

Repro steps and/or sample project

  1. Create a new project named TestProject in a new solution with the same name.
  2. Have the project get created inside a child folder of the solution.
  3. Solution relative path to the project file should be: .\TestProject\TestProject.csproj
  4. Using a linux machine, try to use dotnet nuget push -s to push the project and the symbols.
  5. The package will be pushed but the symbols will error out.

Verbose Logs

Can't include logs since nuget in linux doesn't support the verbosity flag.

executing: [dotnet nuget push *.nupkg -s default -k *** --skip-duplicate]
Your package was pushed.
error: Value cannot be null. (Parameter 'path2')
@erdembayar erdembayar added Product:dotnet.exe Type:Bug Platform:Xplat Functionality:Push Functionality:SDK The NuGet client packages published to nuget.org and removed Functionality:SDK The NuGet client packages published to nuget.org labels Mar 10, 2021
@aortiz-msft aortiz-msft added the Category:Quality Week Issues that should be considered for quality week label Mar 11, 2021
@thargy
Copy link

thargy commented Oct 14, 2021

Yup this null reference is effecting me too 😢 Also, I get this on Windows 11.

@nkolev92 nkolev92 added the Priority:2 Issues for the current backlog. label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Push Platform:Xplat Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Bug
Projects
None yet
Development

No branches or pull requests

7 participants