Paket icon indicating copy to clipboard operation
Paket copied to clipboard

paket.exe pack --symbols does not include source files in generated nuget package

Open NightWatchman opened this issue 5 years ago • 2 comments

Description

When using the paket pack command with the --symbols flag the source code src folder is not included in the resulting symbols.nupkg file.

Repro steps

  1. Using the included Missing.Source.Sample project, run the command .paket\paket.exe pack nugets --symbols

Expected behavior

A .nupkg file with no symbols or sources, and a .symbols.nupkg file with both symbols, and sources.

From documentation (emphasis mine)

Visual Studio can be configured to download symbol/source versions of installed packages from a symbol server, allowing the developer to use the debugger to step into the source (see SymbolSource). These symbol/source packages are the same as the regular packages, but contain the source files (under src) and PDBs alongside the DLLs. Paket can build these symbol/source packages, in addition to the regular packages, using the symbols parameter:

Actual behavior

The generated .nupkg file does include .pdb files (symbols) but does not include a src folder with the source for Class1.cs (sources).

Missing.Source.Sample.zip

NightWatchman avatar Jun 20 '19 17:06 NightWatchman

Any updates on this matter ?

oreleraki avatar Aug 16 '21 15:08 oreleraki

If possible, you should rely on Paket's integration with the dotnet CLI and use dotnet pack to create your packages. This mechanism works seamlessly with the rest of the dotnet toolchain so that you can specify inclusion of source files using the <EmbedUntrackedSources>true</EmbedUntrackedSources> properties like any other project. I personally have used this to great success on a number of other projects for a few years now.

baronfel avatar Aug 16 '21 15:08 baronfel