I have an empty legacy SDK C# class library project (with new Class1 class and single empty method inside him) and I want to publish it with symbols. I did this in the past for SDK project, but it looks like a sourcelink is not supported for legacy .net 4.5.2 .NET Framework projects (despite SymbolPackageFormat=>snupkg
configuration in the project file, the produced package is in .symbols.nupkg
format).
So, my steps are:
1. nuget pack -Build -Symbols -OutputDirectory "..\artifacts" -Version 1.0.0
created 2 packages: PackageName.Version.nupkg
and PackageName.Version.symbols.nupkg
2. nuget push PackageName.Version.symbols.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ###
The package has been successfully published with .pdb files. There are PackageName.dll
and PackageName.pdb
in the lib
folder inside the package storage folder (inside packages
) and in the bin
folder in the project itself. But when I try to debug the package library after consuming, I see the error:
*Source Not found* Class1.cs not found You need to find Class1.cs to view the source for the current stack frame.
Also, even if I fix it, does it mean that during consuming I have to decide which package should I consume, either: normal .nupkg
or symbols.nupkg
(assuming that I also need to publish both of them too with different name, like PackageName vs PackageName.WithSymbols)?