Skip to content

Commit

Permalink
Add a few more changes for signing
Browse files Browse the repository at this point in the history
  • Loading branch information
skylarnam committed Feb 22, 2023
1 parent fc4cd21 commit 466d894
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,22 @@
<Version>3.5.119</Version>
</PackageReference>
</ItemGroup>

<Target Name="SignPublishFiles"
Condition=" '$(MicroBuild_SigningEnabled)' == 'true' "
AfterTargets="Publish">
<ItemGroup>
<FilesToSign Include="$(PublishDir)$(TargetName)$(TargetExt)">
<PublishOnly>true</PublishOnly>
</FilesToSign>
</ItemGroup>
<SignFiles Files="@(FilesToSign)"
Type="$(SignType)"
BinariesDirectory="$(OutDir)"
IntermediatesDirectory="$(IntermediateOutputPath)"
Condition=" '%(FilesToSign.PublishOnly)' == 'true' " />
<ItemGroup>
<FilesToSign Remove="@(FilesToSign)" Condition=" '%(FilesToSign.PublishOnly)' == 'true' " />
</ItemGroup>
</Target>
</Project>
16 changes: 16 additions & 0 deletions VSConfigFinder/VSConfigFinder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,26 @@
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<PublishPath>$(OutputPath)$(RuntimeIdentifier)\publish\</PublishPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<FilesToSign Include="$(PublishPath)VSConfigFinder.dll">
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<FilesToSign Include="$(PublishPath)VSConfigFinder.exe" Condition=" Exists('$(PublishPath)VSConfigFinder.exe') ">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 466d894

Please sign in to comment.