forked from git-ecosystem/git-credential-manager
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.targets
36 lines (31 loc) · 1.55 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
33
34
35
36
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is the root Directory.Build.targets file -->
<!-- Load custom build tasks -->
<Import Project="$(RepoPath)build\GCM.tasks" />
<!-- Use version specified in VERSION file -->
<Target Name="GetVersion" BeforeTargets="BeforeBuild">
<GetVersion VersionFile="$(RepoPath)VERSION">
<Output TaskParameter="Version" PropertyName="Version" />
<Output TaskParameter="AssemblyVersion" PropertyName="AssemblyVersion" />
<Output TaskParameter="FileVersion" PropertyName="FileVersion" />
</GetVersion>
</Target>
<!-- Windows application manifest generation -->
<PropertyGroup Condition="'$(GenerateWindowsAppManifest)' != 'false'">
<ApplicationManifest>$(IntermediateOutputPath)app.manifest</ApplicationManifest>
</PropertyGroup>
<!-- Generate the manifest file before we set the win32 manifest properties -->
<Target Name="GenerateWindowsAppManifest"
BeforeTargets="SetWin32ManifestProperties"
Condition="'$(GenerateWindowsAppManifest)' != 'false'"
Inputs="$(FileVersion);$(AssemblyName)"
Outputs="$(IntermediateOutputPath)app.manifest">
<GenerateWindowsAppManifest Version="$(FileVersion)"
ApplicationName="$(AssemblyName)"
OutputFile="$(IntermediateOutputPath)app.manifest"/>
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)app.manifest" />
</ItemGroup>
</Target>
</Project>