-
Notifications
You must be signed in to change notification settings - Fork 3
/
Directory.Build.targets
25 lines (21 loc) · 1.06 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
<Project>
<PropertyGroup>
<Product Condition="'$(IsTypesProject)' != 'true'">$(Product) ($(Configuration))</Product>
</PropertyGroup>
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
<_Parameter1>CommitHash</_Parameter1>
<_Parameter2>$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(PublicRelease)' == 'true' ">
<_Parameter1>CloudBuildNumber</_Parameter1>
<_Parameter2>$(BuildVersionSimple)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(PublicRelease)' == 'false' ">
<_Parameter1>CloudBuildNumber</_Parameter1>
<_Parameter2>$(BuildVersionSimple)$(SemVerBuildSuffix)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>