-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to ship a nuget package with embedded pdbs #244
Comments
Yes, the sources should be embedded. What VS version do you use? Can you share the package? |
Isn't it also necessary to include:
In the top |
@tmat : I'm running VS 15.9.7 i do have a package on NuGet id is not sourcelinked yet. I was trying it out with a local package feed but that did not work so far! I'll drop a line here, when I have uploaded the package! |
ok I published the nuget package from this repository. This is the release and there is an artifact for the nuget package as well! |
It is not. The project sets |
SourceLink is not needed as you're embedding sources into the PDB. SourceLink is only useful when linking the PDB to sources on a source server. |
@enzian I tried to step into a method in your library and everything seems to work fine in VS 15.9.5. This is what I tried:
<ItemGroup>
<Reference Include="c:\temp\Microsoft.Extensions.Hosting.Kafka.dll"/>
</ItemGroup>
using Microsoft.Extensions.Hosting.Kafka;
class Program
{
static void Main()
{
var s = new KafkaListenerSettings();
s.DefaultTopicConfig = null; // breakpoint
}
} Note that "Just My Code" in the Debugger options must be enabled in order for the above to work. |
Oh, actually, when I used "Step into specific" to step into the library methods then it asked me to disable "Just my Code" and then it worked! Cool! |
I found this thread very helpful, but I'm confused - I don't know if anybody has time to help. From my experience with trying to set up SourceLink on my own packages, I have found that:
One the other hand:
What am I missing? Why do all the tutorials use something which apparently doesn't work?! [EDIT: Okay, I think I'm hitting this issue: https://github.com/dotnet/sdk/issues/1458 ] |
That's right. The SDK unfortunately doesn't copy the PDB as detailed in dotnet/sdk#1458. |
@mikebeaton Any reason not to publish PDBs via symbol packages (snupkg)? |
@tmat I'm trying to set this up on a private NuGet feed, and as far as I can make out neither the file system based feed nor the Microsoft NuGet.Server IIS package have symbol servers or support .snupkg files? |
@tmat Can you open a NuGet issue and link it? |
I was wondering, what kinds of hoops I'd have to jump through to make this work?
I have a .csproj file like this:
but when using the nuget package built from this csproj using
dotnet pack
and I try stepping into an API, VS asks me where to get the source file... Isn't that supposed to be embedded?The text was updated successfully, but these errors were encountered: