Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

SourceLink is not working as expected #21

Closed
mbhoek opened this issue Feb 17, 2020 · 4 comments
Closed

SourceLink is not working as expected #21

mbhoek opened this issue Feb 17, 2020 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@mbhoek
Copy link
Member

mbhoek commented Feb 17, 2020

As a developer (consumer), I expect SourceLink to work. This means that if I use SpecFlow.DepencyInjection, I want to be able to step into the source code as part of the debugging experience.

It appears that SourceLink is not working because the .pdb file cannot be found.
It appears that .pdb file cannot be found because of a 'new build system' where .NET no longer copies the .pdb file from the NuGet package, but only the .dll file.
I've confirmed that if you manually select the .pdb file, you will get SourceLink support; so the main bug seems to be that the .pdb file is no longer copied from the NuGet package.

Proposed solutions are to either embed the .pdb into the .dll file, or setup a separate Symbol Package (also involves additional settings in Visual Studio). Preferred approach appears to be Symbol Packages; see https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg

@mbhoek mbhoek added the bug Something isn't working label Feb 17, 2020
@mbhoek mbhoek added this to the v1.0 milestone Feb 17, 2020
mbhoek added a commit that referenced this issue Feb 17, 2020
Temporary fix until we start providing Symbol Packages as part of #11.
mbhoek added a commit that referenced this issue Feb 17, 2020
* Update description, copyright and support (#19)
* Fix SourceLink by embedding pdb in dll (#21)

Temporary SourceLink fix until we start providing Symbol Packages as part of #11.
@304NotModified
Copy link
Contributor

Is this fixed by #23?

@mbhoek mbhoek mentioned this issue Feb 18, 2020
7 tasks
@mbhoek
Copy link
Member Author

mbhoek commented Feb 18, 2020

Yes, this is fixed by #23 by embedding the pdb in the dll file. The preferred approach however is to provide Symbol Packages, which will be provided as part of #11.

@mbhoek mbhoek closed this as completed Feb 18, 2020
@phatcher
Copy link

It's a little more involved than that, see the conversation in SourceLink, e.g. I might be consuming this from a private NuGet feed in a corporate or a different type of feed, and I don't know whether this scenario will pull from the symbol server as well.

@mbhoek
Copy link
Member Author

mbhoek commented Feb 27, 2020

True, but my counter to that would be that packages like Newtonsoft.Json also provide Symbol Packages and no embedded pdb. Now I by no means want to imply that this package will reach the enormous volume Newtonsoft.Json has, but I imagine that corporate environments already have configuration setup for those packages to work.

Having said that, my goal is to have the best developer experience and I'm kind of ambivalent how to get there; either through embedded pdb (which means larger package size) or through symbol packages (which means extra configuration).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants