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

Consume pdbs from packages in PackageReference - add Debug Symbols to LockFileTargetLibrary #5926

Closed
3 tasks done
Tracked by #10846
wli3 opened this issue Sep 22, 2017 · 15 comments
Closed
3 tasks done
Tracked by #10846

Comments

@wli3
Copy link

wli3 commented Sep 22, 2017

dotnet/sdk#1458 depends on this

To include PDB to CopyLocal, SDK need NuGet.ProjectModel to categorize PDB and XML file to an ideally different category like "debug symbol" or "related file".

So SDK can get all the symbol files by something like var symbolPath = lockFileTargetLibrary.debugSymbols , just like CompileTimeAssemblies, RuntimeAssemblies today

https://github.com/NuGet/NuGet.Client/blob/efae789c75899ca0bdd063f34a4b73cd41510d56/src/NuGet.Core/NuGet.ProjectModel/LockFile/LockFileTargetLibrary.cs#L27

@nkolev92
Copy link
Member

nkolev92 commented Jan 8, 2020

@wli3 @nguerrera

I know we discussed this in a sync-up meeting.
If there's any sort of urgency for this issue, let us know so we can account for that in our triaging.

fyi @aortiz-msft

@nguerrera
Copy link

It was on me to write up a more complete proposal and I got caught up with release issues since. I still intend to push forward on this. It would be good to have it on your radar for soon. There are a lot of pings on related sdk issues for quite some time. I think we should try to prioritize it.

@nkolev92 nkolev92 added Priority:2 Issues for the current backlog. and removed Triage:NeedsTriageDiscussion labels Apr 9, 2020
@nkolev92
Copy link
Member

nkolev92 commented Apr 9, 2020

@wli3
Let us know when this becomes a priority for you.

@nkolev92 nkolev92 changed the title Add Debug Symbols to LockFileTargetLibrary Consume pdbs from packages in PackageReference - add Debug Symbols to LockFileTargetLibrary Apr 27, 2020
@nguerrera
Copy link

nguerrera commented Jun 8, 2020

Here is a small proposal to push this forward:

For any given asset, if there are files next to it that differ only by extension AND those files are not themselves assets of another type, then add a "related" array underneath the asset listing the extensions of these files.

{
  "version": 3,
  "targets": {
    ".NETCoreApp,Version=v5.0": {
      "Newtonsoft.Json/12.0.3": {
        "type": "package",
        "compile": {
-          "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+          "lib/netstandard2.0/Newtonsoft.Json.dll": {
+             "related": [".pdb", ".xml"]
+          }
        },
        "runtime": {
-          "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+          "lib/netstandard2.0/Newtonsoft.Json.dll": {
+             "related": [".pdb", ".xml"]
+          }
      }
    }
  },

Then in the SDK, any place where we copy a nuget asset should respect AllowedReferenceRelatedFileExtensions

Since I no longer work on .NET. I will leave it to the SDK and NuGet teams to come up with a final proposal.

@heng-liu
Copy link
Contributor

Closed as fixed.

@michael-hawker
Copy link

@heng-liu can you provide some more details about where the PR/fix is and when/which release we should expect to see it in? Thanks!

@heng-liu
Copy link
Contributor

Hi @michael-hawker , thanks for asking!
Just want to clarify that, in order to consume related files(.pdb, .xml etc.) in package reference, we need changes from both NuGet and SDK. So the PR NuGet/NuGet.Client#4654 finished the work from NuGet side recently. But it still needs SDK's change to make the feature work.
I guess the SDK tracking issue is dotnet/sdk#1458

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

No branches or pull requests