Add a few more changes for signing · microsoft/VSConfigFinder@466d894 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -6,4 +6,22 @@
6 6 <Version>3.5.119</Version>
7 7 </PackageReference>
8 8 </ItemGroup>
9 +
10 + <Target Name="SignPublishFiles"
11 +Condition=" '$(MicroBuild_SigningEnabled)' == 'true' "
12 +AfterTargets="Publish">
13 + <ItemGroup>
14 + <FilesToSign Include="$(PublishDir)$(TargetName)$(TargetExt)">
15 + <PublishOnly>true</PublishOnly>
16 + </FilesToSign>
17 + </ItemGroup>
18 + <SignFiles Files="@(FilesToSign)"
19 +Type="$(SignType)"
20 +BinariesDirectory="$(OutDir)"
21 +IntermediatesDirectory="$(IntermediateOutputPath)"
22 +Condition=" '%(FilesToSign.PublishOnly)' == 'true' " />
23 + <ItemGroup>
24 + <FilesToSign Remove="@(FilesToSign)" Condition=" '%(FilesToSign.PublishOnly)' == 'true' " />
25 + </ItemGroup>
26 + </Target>
9 27 </Project>
Original file line number Diff line number Diff line change
@@ -7,10 +7,26 @@
7 7 <Nullable>enable</Nullable>
8 8 <PublishSingleFile>true</PublishSingleFile>
9 9 <SelfContained>true</SelfContained>
10 + <PublishTrimmed>true</PublishTrimmed>
11 + <PublishPath>$(OutputPath)$(RuntimeIdentifier)\publish\</PublishPath>
10 12 </PropertyGroup>
11 13
12 14 <ItemGroup>
13 15 <PackageReference Include="CommandLineParser" Version="2.9.1" />
16 + <PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0">
17 + <PrivateAssets>all</PrivateAssets>
18 + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19 + </PackageReference>
20 + </ItemGroup>
21 +
22 + <ItemGroup>
23 + <FilesToSign Include="$(PublishPath)VSConfigFinder.dll">
24 + <Authenticode>Microsoft400</Authenticode>
25 + <StrongName>StrongName</StrongName>
26 + </FilesToSign>
27 + <FilesToSign Include="$(PublishPath)VSConfigFinder.exe" Condition=" Exists('$(PublishPath)VSConfigFinder.exe') ">
28 + <Authenticode>Microsoft400</Authenticode>
29 + </FilesToSign>
14 30 </ItemGroup>
15 31
16 32 <ItemGroup>