Skip to content

Pack symbols in SharedFx for libraries we redist from runtime #62429

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 11 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,33 @@
<AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>

<PartialCompositeAssemblyListPath>PartialCompositeAssemblyListPath.txt</PartialCompositeAssemblyListPath>
<DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
</PropertyGroup>

<PropertyGroup>
<GetSharedFrameworkFilesForReadyToRunDependsOn>
$(GetSharedFrameworkFilesForReadyToRunDependsOn);
_AddExtensionsSymbolsToSymbolPack;
</GetSharedFrameworkFilesForReadyToRunDependsOn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport"
Version="$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
ExcludeAssets="All"
GeneratePathProperty="true" />
</ItemGroup>

<ItemGroup>
<Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)">
<IncludeAssets>Runtime;Native</IncludeAssets>
</Reference>
</ItemGroup>

<ItemGroup>
<_AllExternalAspNetCoreAppReferences Include="@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
</ItemGroup>

<ItemGroup>
<IgnoredDuplicateType Include="Microsoft.AspNetCore.Hosting.WebHostBuilderIISExtensions" />
<IgnoredDuplicateType Include="Microsoft.Extensions.DependencyInjection.SignalRDependencyInjectionExtensions" />
Expand Down Expand Up @@ -86,6 +105,24 @@
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.pdb" />
</ItemGroup>

<!-- Explicitly include symbols for libraries we redistribute from runtime -->
<Target Name="_AddExtensionsSymbolsToSymbolPack">
<!-- Flatten _AllExternalAspNetCoreAppReferences into a property -->
<PropertyGroup>
<FileNameList>@(_AllExternalAspNetCoreAppReferences, ';')</FileNameList>
<!-- Add trailing semicolon -->
<FileNameList>$(FileNameList);</FileNameList>
</PropertyGroup>

<ItemGroup>
<_TransportPdbs Include="$(PkgMicrosoft_Internal_Runtime_AspNetCore_Transport)\**\*.pdb"
Exclude="$(PkgMicrosoft_Internal_Runtime_AspNetCore_Transport)\**\*.ni.pdb" />

<_SymbolFilesToPackage Include="@(_TransportPdbs)"
Condition="'$(FileNameList)' != '' and $(FileNameList.Contains('%(Filename);'))" />
</ItemGroup>
</Target>

<Target Name="_WarnAboutUnbuiltNativeDependencies"
BeforeTargets="Build"
Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) AND
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,30 @@
<GenerateVSInsertionPackages>true</GenerateVSInsertionPackages>
</PropertyGroup>

<PropertyGroup>
<GetSharedFrameworkFilesForReadyToRunDependsOn>
$(GetSharedFrameworkFilesForReadyToRunDependsOn);
_AddExtensionsSymbolsToSymbolPack;
</GetSharedFrameworkFilesForReadyToRunDependsOn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport"
Version="$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
ExcludeAssets="All"
GeneratePathProperty="true" />
</ItemGroup>

<ItemGroup>
<Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)">
<IncludeAssets>Runtime;Native</IncludeAssets>
</Reference>
</ItemGroup>

<ItemGroup>
<_AllExternalAspNetCoreAppReferences Include="@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
</ItemGroup>

<ItemGroup>
<PackageReference Condition="'$(GenerateInstallers)' == 'true'" Include="Microsoft.DotNet.Build.Tasks.Installers" Version="$(MicrosoftDotNetBuildTasksInstallersVersion)" />
<LinuxPackageDependency Include="dotnet-runtime-$(DotnetRuntimeDependencyMajorMinorVersion)" Version="$(DotnetRuntimeDependencyVersion)" />
Expand Down Expand Up @@ -83,6 +102,24 @@
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.pdb" />
</ItemGroup>

<!-- Explicitly include symbols for libraries we redistribute from runtime -->
<Target Name="_AddExtensionsSymbolsToSymbolPack">
<!-- Flatten _AllExternalAspNetCoreAppReferences into a property -->
<PropertyGroup>
<FileNameList>@(_AllExternalAspNetCoreAppReferences, ';')</FileNameList>
<!-- Add trailing semicolon -->
<FileNameList>$(FileNameList);</FileNameList>
</PropertyGroup>

<ItemGroup>
<_TransportPdbs Include="$(PkgMicrosoft_Internal_Runtime_AspNetCore_Transport)\**\*.pdb"
Exclude="$(PkgMicrosoft_Internal_Runtime_AspNetCore_Transport)\**\*.ni.pdb" />

<_SymbolFilesToPackage Include="@(_TransportPdbs)"
Condition="'$(FileNameList)' != '' and $(FileNameList.Contains('%(Filename);'))" />
</ItemGroup>
</Target>

<Target Name="_WarnAboutUnbuiltNativeDependencies"
BeforeTargets="Build"
Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) AND
Expand Down
Loading