<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!--Build output setting-->
  <PropertyGroup>
    <EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'build.ps1'))</EnlistmentRoot>
    <EnlistmentRootSrc>$(EnlistmentRoot)\src</EnlistmentRootSrc>

    <ArtifactRoot>$(EnlistmentRoot)\artifacts</ArtifactRoot>
    <ArtifactRoot>$([System.IO.Path]::GetFullPath( $(ArtifactRoot) ))</ArtifactRoot>

    <BaseIntermediateOutputPath>$(ArtifactRoot)\.obj</BaseIntermediateOutputPath>
    <BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>

    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

    <OutputPath>$(ArtifactRoot)\$(MSBuildProjectName)</OutputPath>
    <OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>

    <AppxPackageDir>$(OutputPath)</AppxPackageDir>

    <IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(MSBuildProjectName)</IntermediateOutputPath>
    <IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>

    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(BuildNumber)' == '' ">
    <SemanticVersionDate>2015-11-30</SemanticVersionDate>
    <Ticks1>$([System.DateTime]::Parse($(SemanticVersionDate)).Ticks)</Ticks1>
    <Ticks2>$([System.DateTime]::Now.Ticks)</Ticks2>
    <SpanTicks>$([MSBuild]::Subtract($(Ticks2), $(Ticks1)))</SpanTicks>
    <SpanMinutes>$([System.TimeSpan]::FromTicks($(SpanTicks)).TotalMinutes)</SpanMinutes>
    <BuildNumber>$([System.String]::Format('{0:F0}', $([MSBuild]::Divide($([System.Convert]::ToDouble($(SpanMinutes))), 5))))</BuildNumber>
  </PropertyGroup>

  <PropertyGroup Condition="'$(ReleaseLabel)' == ''">
    <ReleaseLabel>zlocal</ReleaseLabel>
  </PropertyGroup>

  <PropertyGroup>
    <SchemaVersion>2.0</SchemaVersion>
    <TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
    <ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
  </PropertyGroup>
</Project>