Open
Description
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
- Create a new project named
TestProject
in a new solution with the same name. - Have the project get created inside a child folder of the solution.
- Solution relative path to the project file should be:
.\TestProject\TestProject.csproj
- Using a linux machine, try to use
dotnet nuget push -s
to push the project and the symbols. - 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')