Skip to content

Commit 31d81eb

Browse files
committed
Sign the GalleryManifest.xml file
1 parent fe92bf7 commit 31d81eb

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/SosThreadingTools/SosThreadingTools.targets

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,40 @@
2323

2424
<PropertyGroup>
2525
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
26-
<GenerateNuspecDependsOn>StampAndIncludeGalleryManifest;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
2726
</PropertyGroup>
2827

28+
<ItemGroup>
29+
<GalleryManifest Include="$(IntermediateOutputPath)GalleryManifest.xml" Condition="'$(RuntimeIdentifier)'=='win-x64'" />
30+
</ItemGroup>
2931
<ItemGroup>
3032
<FilesToSign Include="$(TargetDir)$(DnneNativeBinaryName).dll">
3133
<StrongName />
3234
</FilesToSign>
35+
<FilesToSign Include="@(GalleryManifest)">
36+
<Authenticode>MicrosoftXmlSHA2</Authenticode>
37+
<StrongName />
38+
</FilesToSign>
39+
</ItemGroup>
40+
<ItemGroup>
41+
<SignFilesDependsOn Include="StampAndIncludeGalleryManifest" />
3342
</ItemGroup>
3443

35-
<Target Name="PackBuildOutputs" DependsOnTargets="DebugSymbolsProjectOutputGroup">
44+
<Target Name="PackBuildOutputs" DependsOnTargets="DebugSymbolsProjectOutputGroup;StampAndIncludeGalleryManifest">
3645
<ItemGroup>
3746
<TfmSpecificPackageFile Include="$(TargetPath)" PackagePath="tools\$(RuntimeIdentifier)\" />
3847
<TfmSpecificPackageFile Include="$(TargetDir)$(TargetName).runtimeconfig.json" PackagePath="tools\$(RuntimeIdentifier)\" />
3948
<TfmSpecificPackageFile Include="@(DebugSymbolsProjectOutputGroupOutput->'%(FinalOutputPath)')" PackagePath="symbols\$(RuntimeIdentifier)\" />
4049
<TfmSpecificPackageFile Include="$(TargetDir)*.dll" PackagePath="tools\$(RuntimeIdentifier)\" />
4150
</ItemGroup>
4251
</Target>
43-
<Target Name="StampAndIncludeGalleryManifest" DependsOnTargets="GetBuildVersion" BeforeTargets="_GetPackageFiles">
52+
<Target Name="StampAndIncludeGalleryManifest" DependsOnTargets="GetBuildVersion" Condition="'@(GalleryManifest)'!=''">
4453
<ReplaceFileText
4554
InputFilename="GalleryManifest.xml"
46-
OutputFilename="$(IntermediateOutputPath)GalleryManifest.xml"
55+
OutputFilename="@(GalleryManifest)"
4756
MatchExpression="\$Version\$"
4857
ReplacementText="$(BuildVersion)" />
4958
<ItemGroup>
50-
<None Include="$(IntermediateOutputPath)GalleryManifest.xml" Pack="true" PackagePath="" />
59+
<TfmSpecificPackageFile Include="@(GalleryManifest)" PackagePath="" />
5160
</ItemGroup>
5261
</Target>
5362
</Project>

0 commit comments

Comments
 (0)