Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
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
14 changes: 13 additions & 1 deletion src/sign.builds
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PropertyGroup>
<!-- The SignFiles target needs OutDir to be defined -->
<OutDir>$(BinDir)</OutDir>
<DebuggingCert>MicrosoftSHA2</DebuggingCert>
</PropertyGroup>

<UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="ReadSigningRequired" />
Expand Down Expand Up @@ -35,9 +36,20 @@
Managed assemblies should already have a requires_signing file dropped so only generate
a requires_signing file for ones that don't exist which should leave just native assembies
-->
<ItemGroup>
<!-- The DAC requires special signing for !analyze/watson to work properly. -->
<SpecialDebuggingDlls Include="$(BinDir)$(CrossTargetComponentFolder)/mscordaccore*.dll" />
<SpecialDebuggingDlls Include="$(BinDir)mscordaccore*.dll" />
<WindowsNativeLocation Remove="@(SpecialDebuggingDlls)"/>
</ItemGroup>

<WriteSigningRequired AuthenticodeSig="$(AuthenticodeSig)"
MarkerFile="%(WindowsNativeLocation.Identity).requires_signing"
Condition="!Exists('%(WindowsNativeLocation.Identity).requires_signing')" />

<WriteSigningRequired AuthenticodeSig="$(DebuggingCert)"
MarkerFile="%(SpecialDebuggingDlls.Identity).requires_signing"
Condition="!Exists('%(SpecialDebuggingDlls.Identity).requires_signing')" />
</Target>

<!-- populates item group FilesToSign with the list of files to sign -->
Expand All @@ -63,4 +75,4 @@
<Delete Files="@(SignMarkerFile)" />
</Target>

</Project>
</Project>