Python.Included icon indicating copy to clipboard operation
Python.Included copied to clipboard

Suggestion: Distribute `PDB` files alongside `DLL`s

Open JimiC opened this issue 2 years ago • 6 comments

Distributing the .pdb files will help us debug your library from within our code.

https://devblogs.microsoft.com/visualstudio/debugging-external-sources-with-visual-studio/

JimiC avatar Jun 23 '22 09:06 JimiC

I added <IncludeSymbols>true</IncludeSymbols> to the csproj files which generates a Python.Deployment.1.4.1.symbols.nupkg in addition to the Python.Deployment.1.4.1.nupkg package. However, it won't let me upload that as it competes with the 1.4.1 package without symbols.

henon avatar Jun 23 '22 09:06 henon

According to https://stackoverflow.com/questions/41713693/include-pdb-files-into-my-nuget-nupkg-files there is a way to include the PDBs with

<files>
    <file src="bin\$configuration$\$id$.pdb" target="lib\net452\" />
</files>

but I don't know where I should put that. Surely not in the csproj file, right?

henon avatar Jun 23 '22 09:06 henon

At some point your are creating a zip file on release. Include the pdb file in it.

Come to think of it again, I suppose that the nuget tool does the zipping, so the above suggestion is not applicable. Let me do a search on the matter.

JimiC avatar Jun 23 '22 09:06 JimiC

I use the Create package on build feature. When compiling the project it automatically generates the nugets. It is convenient. I guess using the command line with dotnet pack --include-symbols --include-source instead might solve it. I could probably upload them as separate debug packages like Python.Deployment.Debug.1.4.1.nupkg so you can switch at will.

henon avatar Jun 23 '22 09:06 henon

I added <IncludeSymbols>true</IncludeSymbols> to the csproj files which generates a Python.Deployment.1.4.1.symbols.nupkg in addition to the Python.Deployment.1.4.1.nupkg package. However, it won't let me upload that as it competes with the 1.4.1 package without symbols.

Yes. It won't allow you to upload a package that is already released because there are security risks or breaking changes by doing that. Same goes for npm where I have more knowledge of.

JimiC avatar Jun 23 '22 09:06 JimiC

Python.Deployment.Debug.1.4.1.nupkg

That's a reasonable solution.

JimiC avatar Jun 23 '22 09:06 JimiC