Skip to content

Commit 3f1943e

Browse files
authored
Include Pkcs (net10.0 & -windows) in aspnetcore transport pack (#117173)
Fixes #117146
1 parent 544995b commit 3f1943e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

eng/packaging.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@
250250
<!-- Add ReferenceCopyLocalPaths for ProjectReferences which are flagged as Pack="true" into the package. -->
251251
<_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('Pack', 'true'))" />
252252
<TfmSpecificPackageFile Include="@(_projectReferenceCopyLocalPaths)"
253-
PackagePath="$([MSBuild]::ValueOrDefault('%(ReferenceCopyLocalPaths.PackagePath)', '$(BuildOutputTargetFolder)\$(_referringTargetFramework)\'))" />
253+
PackagePath="$([MSBuild]::ValueOrDefault('%(ReferenceCopyLocalPaths.PackagePath)', '$(BuildOutputTargetFolder)/$(_referringTargetFramework)/'))" />
254254
<TfmSpecificDebugSymbolsFile Include="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))"
255-
TargetPath="/%(TfmSpecificPackageFile.PackagePath)/%(Filename)%(Extension)"
255+
TargetPath="/%(TfmSpecificPackageFile.PackagePath)%(Filename)%(Extension)"
256256
TargetFramework="$(_referringTargetFramework)"
257257
Condition="'$(IncludeSymbols)' == 'true'" />
258258
<!-- Remove symbol from the non symbol package. -->

src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<NoWarn>$(NoWarn);NU5131</NoWarn>
1515
<!-- Include the symbols in the non-symbols package so that they get redistributed into aspnetcore's shared framework. -->
1616
<IncludeSymbolsInPackage>true</IncludeSymbolsInPackage>
17+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludePkcsWindowsProjectReference</TargetsForTfmSpecificContentInPackage>
1718
</PropertyGroup>
1819

1920
<ItemGroup>
@@ -23,6 +24,7 @@
2324
PrivateAssets="all"
2425
Private="true"
2526
IncludeReferenceAssemblyInPackage="true" />
27+
2628
<!-- These generators only provides an implementation targeting Roslyn 4.4 and upwards. -->
2729
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Configuration.Binder\gen\Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj"
2830
ReferenceOutputAssembly="false"
@@ -33,6 +35,24 @@
3335
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj"
3436
ReferenceOutputAssembly="false"
3537
PackAsAnalyzer="true" />
38+
39+
<!-- Manually reference Pkcs to make sure that the $(NetCoreAppCurrent)-windows assembly gets included as well. -->
40+
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj"
41+
PrivateAssets="all"
42+
SetTargetFramework="TargetFramework=$(NetCoreAppCurrent)-windows"
43+
OutputItemType="PkcsWindowsProjectReference" />
3644
</ItemGroup>
3745

46+
<Target Name="IncludePkcsWindowsProjectReference" DependsOnTargets="BuildOnlySettings;ResolveReferences">
47+
<ItemGroup>
48+
<TfmSpecificPackageFile Include="@(PkcsWindowsProjectReference)"
49+
PackagePath="/runtimes/win/lib/$(NetCoreAppCurrent)/" />
50+
<_pkcsWindowsProjectReferenceAsPdb Include="$([System.IO.Path]::ChangeExtension('%(PkcsWindowsProjectReference.Identity)', '.pdb'))" />
51+
<TfmSpecificDebugSymbolsFile Include="@(_pkcsWindowsProjectReferenceAsPdb)"
52+
TargetPath="/runtimes/win/lib/$(NetCoreAppCurrent)/%(Filename)%(Extension)"
53+
TargetFramework="$(NetCoreAppCurrent)" />
54+
</ItemGroup>
55+
</Target>
56+
57+
3858
</Project>

src/libraries/NetCoreAppLibrary.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
Microsoft.Extensions.Primitives;
225225
System.Diagnostics.EventLog;
226226
System.Formats.Cbor;
227+
System.Security.Cryptography.Pkcs;
227228
System.Security.Cryptography.Xml;
228229
System.Threading.AccessControl;
229230
System.Threading.RateLimiting;

0 commit comments

Comments
 (0)