Skip to content
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

[Proposal] Added IncludeSymbolsInPackage property #1971

Closed
wants to merge 2 commits into from

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Jan 23, 2018

Addresses NuGet/Home#4142. The rationale for why people are moving away from using separate symbol packages is stated well by Oren. I think in the increasing era of source-linked and source-embedded PDBs, the demand for NuGet.org package debugging to "just work" is only going to increase as well.

The current workaround (at the time NuGet/Home#4142 was closed) is too much to type, or bookmark and paste; it is not documented, and it shows its implementation details:

<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>

Also, it's missing .mdb. AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder takes AllowedOutputExtensionsInPackageBuildOutputFolder and adds .pdb and .mdb.

Could we please have a nicer bool property like the IncludeSymbolsInPackage @davidfowl suggested? It's the only future-proof or palatable long-term solution that I've seen so far. Very specifically, AllowedOutputExtensionsInPackageBuildOutputFolder needs to be evaluated after AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder is defined so that it can simply copy it when IncludeSymbolsInPackage is true. (See the commit.)

Testing/Validation

Tests Added: No
Reason for not adding tests: need guidance
Validation done:

@jnm2 jnm2 changed the title Added IncludeSymbolsInPackage property [Proposal] Added IncludeSymbolsInPackage property Jan 23, 2018
oakio added a commit to Codestellation/Nova that referenced this pull request Feb 5, 2018
@@ -45,6 +45,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<ImportNuGetBuildTasksPackTargetsFromSdk Condition="'$(ImportNuGetBuildTasksPackTargetsFromSdk)' == ''">false</ImportNuGetBuildTasksPackTargetsFromSdk>
<AllowedOutputExtensionsInPackageBuildOutputFolder>.dll; .exe; .winmd; .json; .pri; .xml; $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>.pdb; .mdb; $(AllowedOutputExtensionsInPackageBuildOutputFolder); $(AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder)</AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>
<AllowedOutputExtensionsInPackageBuildOutputFolder Condition="'$(IncludeSymbolsInPackage)' == 'true'">$(AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd rather have .pdb and .mdb in a property called SymbolExtensions, and that property be appended to both AllowedOutputExtensionsInPackageBuildOutputFolder (if IncludeSymbolsInPackage is set to true) and AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohit21agrawal Sure! Would the extensions .dll; .exe; .winmd; .json; .pri; .xml get the same treatment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I think it's fine the way it is. they aren't used any place else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the symbol extensions are prepended. Did you want me to switch it to append them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering doesn’t really matter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Copy link
Contributor

@rohit21agrawal rohit21agrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@rrelyea
Copy link
Contributor

rrelyea commented Feb 8, 2018

Would like to make sure this is considered as part of our coming symbol server work. Let's not do this until we finish that detailed design beyond the current published spec.

@davidfowl
Copy link
Member

@rrelyea does this make it harder? It's not like it's on by default, this is still opt-in...

@mattnischan
Copy link

mattnischan commented Feb 26, 2018

Agreed with @davidfowl here, seems like the two things are potentially orthogonal. This is biting us in development right now as we were previously shipping symbols for devs to use on their dev machines during debugging with the old tooling. The new tooling isn't allowing us to do that, aside from the specified workaround, which feels brittle.

@rrelyea
Copy link
Contributor

rrelyea commented Feb 26, 2018

@rohit21agrawal - Please do not merge until we talk through this and how it relates to our new work.

@rohit21agrawal
Copy link
Contributor

Yes, not planning on it. Just approved the code review

@rohit21agrawal
Copy link
Contributor

closing this as we have finalized the spec for newer format of symbol packages : https://github.com/NuGet/Home/wiki/NuGet-Package-Debugging-&-Symbols-Improvements

@bjorn-ali-goransson
Copy link

And symbols packages will work for local nuget feeds? Or is settting up a symbol server required...

@loic-sharma
Copy link
Contributor

Symbol packages do not work with local NuGet feeds. You can get around this by embedding your symbols into your NuGet package. Alternatively, you can use BaGet to setup a symbol server: https://github.com/loic-sharma/BaGet

@davidfowl
Copy link
Member

#shamelessplug 😄

@gilescope
Copy link

closing this as we have finalized the spec for newer format of symbol packages : https://github.com/NuGet/Home/wiki/NuGet-Package-Debugging-&-Symbols-Improvements

Is there a sensible way to easily include symbols now?

@jnm2
Copy link
Contributor Author

jnm2 commented Sep 30, 2019

@dcanning
Copy link

dcanning commented Nov 11, 2022

https://learn.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg

Note
Azure Devops Artifacts does not currently support debugging via .snupkg files.

When are we going to get support for debugging from private nuget feeds?

@zivkan
Copy link
Member

zivkan commented Nov 11, 2022

@dcanning Azure DevOps already has symbol server support. It's just that you publish the pdbs to it directly, rather than publishing via a snupkg. Our docs page on hosting your own packages lists a bunch of nuget servers that can be used for private feeds (some are cloud hosted, some can be self hosted), and I know BaGet supports symbols, googling teamcity symbol server and artifactory symbols sever shows results that make it appear that they support symbols as well. So, I don't believe there's anything preventing private feeds from hosting symbols. It's just that the symbols are downloaded via the symbol server protocol, not NuGet's protocol, and how you upload the symbols depends on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants