Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit f1c9358

Browse files
authored
Sign api-ms-win-core-xstate-l2-1-0.dll (#19451)
This file is only catalog signed in RS4. Sign during the build. To achieve this copy the CRT binaries locally rather than referencing from the UCRT location directly.
1 parent 67a2105 commit f1c9358

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Windows_NT.Microsoft.NETCore.Runtime.CoreCLR.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<NativeBinary Include="$(BinDir)mscorrc.debug.dll" />
2020
<NativeBinary Include="$(BinDir)mscorrc.dll" />
2121
<NativeBinary Include="$(BinDir)sos.dll" />
22-
<NativeBinary Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" Condition="'$(BuildType)'=='Release' AND '$(BuildArch)' != 'arm64'" />
22+
<NativeBinary Include="$(BinDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" Condition="'$(BuildType)'=='Release' AND '$(BuildArch)' != 'arm64'" />
2323
<NativeBinary Include="$(BinDir)System.Private.CoreLib.dll" />
2424
<ArchitectureSpecificLibFile Include="$(BinDir)SOS.NETCore.dll" />
2525
<ArchitectureSpecificToolFile Include="$(BinDir)crossgen.exe" />

src/build.proj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
DestinationFolder="$(BinDir)PDB" />
3939
</Target>
4040

41+
<ItemGroup>
42+
<UcrtFilesToCopy Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" />
43+
</ItemGroup>
44+
<!-- Copy the UCRT files from the windows kit directory to the local directory.
45+
The api-*xstate.dll binary needs to be signed. -->
46+
<Target Name="CopyUcrtFiles" AfterTargets="Build">
47+
<Copy Condition="'$(BuildType)'=='Release' AND '$(BuildArch)' != 'arm64'"
48+
SourceFiles="@(UcrtFilesToCopy)"
49+
DestinationFolder="$(BinDir)Redist\ucrt\DLLs\$(BuildArch)" />
50+
</Target>
51+
4152
<PropertyGroup>
4253
<RunEnforcePGO Condition="$(__EnforcePgo) == '1'">true</RunEnforcePGO>
4354
<RunEnforcePGO Condition="$(__BuildArch) == 'arm' OR $(__BuildArch) == 'arm64'">false</RunEnforcePGO>

src/sign.builds

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<!-- Ensure cross targeting components are signed properly -->
1818
<WindowsNativeLocation Include="$(BinDir)$(CrossTargetComponentFolder)\*.exe" />
1919
<WindowsNativeLocation Include="$(BinDir)$(CrossTargetComponentFolder)\*.dll" />
20+
<!-- Sign api-ms-win-core-xstate-l2-1-0 binary as it is only catalog signed in the current SDK. -->
21+
<WindowsNativeLocation Include="$(BinDir)Redist\ucrt\DLLs\api-ms-win-core-xstate-l2-1-0.dll" />
2022
</ItemGroup>
2123
<!-- sign the cross targeted files as well -->
2224
<ItemGroup Condition="'$(CrossTargetComponentFolder)' != ''">

0 commit comments

Comments
 (0)