sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet pack produces an invalid symbols package under linux

Open sheltonc opened this issue 9 years ago • 2 comments

The following repository contains scripts and a sample project to reproduce the issue. You will need docker installed.

https://bitbucket.org/sheltony/dotnetpackbug

The sample dotnet project contains two classes

  • dotnetPackBug.Class1
  • dotnetPackBug.Namespace.Class2

To run this, just execute run.ps1

You'll end up with two folders WindowsOut and LinuxOut, Each of which will have dotnetPackBug.1.0.0.symbols.nupkg, which you can use to observe the following:

When creating a symbols package under windows, the output symbols.nupkg output contains a valid package. Inside the nupkg. we have a src folder with the following structure.

WindowsOut/dotnetPackBug.1.0.0.symbols.nupkg
src
    dotnetPackBug
        Namespace
            Class2.cs
        dotnetPackBug.csproj
        Class1.cs

However, under linux, the same command produces a package with the following incorrect structure:

LinuxOut/dotnetPackBug.1.0.0.symbols.nupkg
src
    dotnetPackBug
        dotnetPackBug.csproj
        Class1.cs

You can see that any source files that are not at the root level in the dotnet project (e.g. everything in a namespace) are not included in the symbols package in the src folder. They're in fact included in the package at the wrong level (the root level of the package).

sheltonc avatar Oct 04 '17 05:10 sheltonc

Moving this to NuGet so that they can have first look. If this turns out to be an issue in the SDK, please move it back.

livarcocc avatar Nov 11 '17 06:11 livarcocc

This issue was moved to NuGet/Home#6160

livarcocc avatar Nov 11 '17 06:11 livarcocc