When doing a nuget pack against a .csproj file that has an accompanying .nuspec file, what is the syntax for excluding certain files from the symbols .nupkg?
For clarity, I do not want to exclude these files from the normal .nupkg, just from the symbols .nupkg. This is because SymbolSource fails to parse these files as managed assemblies.
Our workaround is to remove specific files from the symbols .nupkg after it has been created but it would be preferable to exclude them in some declarative fashion in either the .nuspec file or else in the package command.
This might be abit of hack, but you could something like this:
nuget pack mypackage.nuspec -Symbols -Exclude "*/*.exe;*/*.dll"
Where "*/*.exe;*/*.dll"
are the files you want to ignore and then run
nuget pack mypackage.nuspec
Where your mypackage.nuspec includes everything that you want in your regular nuget package.
This shouldn't cause any problems, since the dll, pdb and nuget packages should still have all matching versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With