Created
January 18, 2024 12:32
-
-
Save NiKiZe/a46affda448a222bac617a1a2f8eba75 to your computer and use it in GitHub Desktop.
Sign msbuild properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="_SignAssemblies" AfterTargets="Compile" DependsOnTargets="CreateSatelliteAssemblies;$(RazorCompileDependsOn)" Condition="'$(CertificateThumbprint)' != ''"> | |
<ItemGroup> | |
<_AssembliesToSign Include="$(IntermediateOutputPath)$(TargetFileName)" /> | |
<_AssembliesToSign Include="@(IntermediateSatelliteAssembliesWithTargetPath)" /> | |
<_AssembliesToSign Include="@(RazorIntermediateAssembly)" /> | |
</ItemGroup> | |
<Message Importance="high" Text="Signing assemblies: @(_AssembliesToSign)" /> | |
<SignFile SigningTarget="%(_AssembliesToSign.Identity)" CertificateThumbprint="$(CertificateThumbprint)" TimestampUrl="$(TimestampUrl)"/> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is based on dotnet/msbuild#6788 but reusing CertificateThumbprint and TimestampUrl as already defined