-
Notifications
You must be signed in to change notification settings - Fork 39
/
Directory.Build.targets
32 lines (25 loc) · 1.23 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<Project>
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Common.targets" />
<PropertyGroup>
<UseUWP Condition="($(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'net461')">true</UseUWP>
<UseUWP Condition="'$(UseUWP)' == ''">false</UseUWP>
</PropertyGroup>
<Choose>
<When Condition="!($(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native' or $(IsSampleProject))">
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</When>
</Choose>
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.UWP.Build.targets" Condition="$(UseUWP)" />
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Workarounds.Xaml.targets" Condition="$(IsCoreProject)" />
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
<_Parameter1>CommitHash</_Parameter1>
<_Parameter2>$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>