Skip to content

Get native .pdb into Shared Framework symbol package #62124

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

Merged
merged 2 commits into from
May 28, 2025
Merged

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented May 27, 2025

Fixes #62123. Test build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2718027&view=results

Matches instructions from arcade docs

@wtgodbe wtgodbe requested review from jkoritzinsky and Copilot May 27, 2025 19:33
@github-actions github-actions bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label May 27, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures native .pdb files are included in the Shared Framework symbol package by adding a custom MSBuild target and wiring it into the ReadyToRun file resolution process.

  • Introduces _ResolveCopyLocalNativeReference target to copy native runtime assets.
  • Hooks the new target into GetSharedFrameworkFilesForReadyToRunDependsOn in both runtime project files.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj Adds new target and appends it to GetSharedFrameworkFilesForReadyToRunDependsOn.
src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.Composite.sfxproj Mirrors the addition of the new target and dependency in the composite project file.

@wtgodbe wtgodbe requested a review from Copilot May 27, 2025 22:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that the native debugging symbols (.pdb) for aspnetcorev2_inprocess are packaged alongside the native runtime assets in the Shared Framework symbol package.

  • Adds a <NativeRuntimeAsset> entry for the .pdb in the App.Runtime project
  • Mirrors the same addition in the Composite App.Runtime project for consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj Added <NativeRuntimeAsset> entry for the .pdb
src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.Composite.sfxproj Added <NativeRuntimeAsset> entry for the .pdb in composite
Comments suppressed due to low confidence (2)

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj:83

  • Add an integration or packaging test to verify that the .pdb file is correctly included in the Shared Framework symbol package during build/publish.
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.pdb"

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.Composite.sfxproj:86

  • Add a test to confirm the .pdb is included in the Composite Shared Framework symbol package as expected.
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.pdb"

@@ -79,9 +79,10 @@

<NativeRuntimeAsset Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) "
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.dll" />
<NativeRuntimeAsset Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) "
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.pdb" />
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider extracting this duplicated .pdb inclusion into a shared MSBuild target or props file to avoid copy-paste between the two projects.

Copilot uses AI. Check for mistakes.

@@ -82,9 +82,10 @@

<NativeRuntimeAsset Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) "
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.dll" />
<NativeRuntimeAsset Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) "
Copy link
Member

Choose a reason for hiding this comment

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

Usually other repos have done this in _SymbolFilesToPackage, but I'll let Jeremy comment on the more idiomatic way of doing this

Copy link
Member Author

Choose a reason for hiding this comment

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

It feels to me like NativeRuntimeAsset is more "built in" since it's exposed in the docs, though it's not really purpose-built for symbols. I'm fine either way

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I prefer NativeRuntimeAsset over _SymbolFilesToPackage.

@wtgodbe
Copy link
Member Author

wtgodbe commented May 28, 2025

Test build worked

@wtgodbe wtgodbe merged commit 9c8a0c3 into main May 28, 2025
27 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/FixPDB branch May 28, 2025 16:50
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview6 milestone May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aspnetcorev2_inprocess.pdb no longer included in SharedFx symbol package
3 participants