blob: 84d9be6fa1b47512723dcf5dd0c0880a2d04d72e (
plain)
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
|
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Import the version of CustomBuildTasks.dll that is dropped in the repository. -->
<UsingTask TaskName="GenerateUniqueIdentifierTask" AssemblyFile="..\Lib\CustomBuildTasks\CustomBuildTasks.dll" />
<!-- Set the path of the generated UniqueIdentifier.cs file. -->
<PropertyGroup>
<!-- To allow this target to be run from other directories besides the current one,
we use construct the relative path to output UniqueIdentifer.cs from this directory.
As not all versions of xbuild support the MSBuildThisFileDirectory property, we
we check and fall back to the current directory if the MSBuildThisFileDirectory property
is empty. -->
<LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' == ''">.</LibGit2SharpPath>
<LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' != ''">$(MSBuildThisFileDirectory)</LibGit2SharpPath>
<UniqueIdentifierPath>$(LibGit2SharpPath)\Core\UniqueIdentifier.cs</UniqueIdentifierPath>
<CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateUniqueIdentifierCs</CoreCompileDependsOn>
<CoreCleanDependsOn>$(CoreCleanDependsOn);CleanUniqueIdentifierCs</CoreCleanDependsOn>
</PropertyGroup>
<!-- This target runs if any of the projects or .cs files for the project have changed since the last time
the UniqueIdentifier.cs file was generated. -->
<Target Name="GenerateUniqueIdentifierCs"
Inputs="$(MSBuildThisFileFullPath);$(MSBuildAllProjects);@(Compile)"
Outputs="$(UniqueIdentifierPath)">
<GenerateUniqueIdentifierTask OutputFile="$(UniqueIdentifierPath)" />
</Target>
<Target Name="CleanUniqueIdentifierCs">
<Delete Files="$(UniqueIdentifierPath)" />
</Target>
</Project>
|