-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
45 lines (39 loc) · 2.07 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
45 lines (39 loc) · 2.07 KB
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
37
38
39
40
41
42
43
44
45
<?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\msbuild\gcm.tasks" />
<!-- Use version specified in VERSION file -->
<Target Name="GetVersion" BeforeTargets="BeforeBuild;GenerateWindowsAppManifest">
<GetVersion VersionFile="$(RepoPath)VERSION" VersionOverride="$(VersionOverride)">
<Output TaskParameter="Version" PropertyName="Version" />
<Output TaskParameter="AssemblyVersion" PropertyName="AssemblyVersion" />
<Output TaskParameter="FileVersion" PropertyName="FileVersion" />
</GetVersion>
</Target>
<!-- Suppress the "This call site is reachable on all platforms" warning
for all test projects - we use custom Xunit attributes to dynamically
skip OS-specific tests unless the test is running on the appropriate OS.
The analyzer for CA1416 does not know how to handle this. -->
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<NoWarn>$(NoWarn);CA1416</NoWarn>
</PropertyGroup>
<!-- 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"
AfterTargets="GetVersion"
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>