Skip to content

Commit 8060f01

Browse files
authored
Merge pull request #17 from windows-toolkit/enableSigning
Added signing.
2 parents 17e1b36 + fd0f243 commit 8060f01

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

ColorCode.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorCode.BasicTests", "Tes
1515
EndProject
1616
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorCode.UWPTests", "Tests\ColorCode.UWPTests\ColorCode.UWPTests.csproj", "{A3D5A8A5-1D1F-412D-A829-C3DC1C7D4DF3}"
1717
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A4B1B99B-FC3A-4C76-8B46-B96723829FD2}"
19+
ProjectSection(SolutionItems) = preProject
20+
azure-pipelines.yml = azure-pipelines.yml
21+
ColorCode.snk = ColorCode.snk
22+
Directory.Build.props = Directory.Build.props
23+
Directory.Build.targets = Directory.Build.targets
24+
global.json = global.json
25+
version.json = version.json
26+
EndProjectSection
27+
EndProject
1828
Global
1929
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2030
Debug|Any CPU = Debug|Any CPU

ColorCode.snk

596 Bytes
Binary file not shown.

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<Copyright>Copyright © Microsoft Corporation, William Bradley 2017</Copyright>
1010
<!-- Project States -->
1111
<IsUwpProject>$(MSBuildProjectName.Contains('UWP'))</IsUwpProject>
12-
<IsAndroidProject>$(MSBuildProjectName.Contains('Android'))</IsAndroidProject>
12+
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
1313
<!-- UWP Config -->
1414
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
1616
</PropertyGroup>
1717

1818
<Choose>
19-
<When Condition="'$(IsUwpProject)' == 'true' or '$(IsAndroidProject)' == 'true'">
19+
<When Condition="'$(IsUwpProject)' == 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsTestProject)' != 'true'">
2020
<PropertyGroup>
2121
<GenerateLibraryLayout>true</GenerateLibraryLayout>
2222
</PropertyGroup>

Directory.Build.targets

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project>
2+
3+
<Choose>
4+
<When Condition="(!$(TargetFramework.Contains(`uap10.0`)) and '$(TargetFramework)' != 'native' and '$(IsTestProject)' != 'true')">
5+
<PropertyGroup>
6+
<SignAssembly>true</SignAssembly>
7+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ColorCode.snk</AssemblyOriginatorKeyFile>
8+
</PropertyGroup>
9+
</When>
10+
</Choose>
11+
12+
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
13+
<ItemGroup>
14+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
15+
<_Parameter1>CommitHash</_Parameter1>
16+
<_Parameter2>$(SourceRevisionId)</_Parameter2>
17+
</AssemblyAttribute>
18+
</ItemGroup>
19+
</Target>
20+
21+
</Project>

0 commit comments

Comments
 (0)