<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--=============================================================================================-->
<Import Project="BookRegistry.Common.props" Condition=" '$(BookRegistryCommonProps_Imported)' != 'true' " />
<!--=============================================================================================-->

<Target Name="_VerifyBuildParameters_">
   <Error Condition=" '$(Platform)' == '' "
          Text="Project property was not specified: &quot;Platform&quot;." />
   <Error Condition=" '$(Configuration)' == '' "
          Text="Project property was not specified: &quot;Configuration&quot;." />
</Target>

<!--=============================================================================================-->

<Target Name="_CleanAll_">
   <RemoveDir
      Directories="@(_CleanAll_Folders_)" />
   <Delete
      Files="@(_CleanAll_Files_)" />
</Target>

<Target
   Name="_CleanAssemblyReferences_"
   Condition=" '@(_CleanAssemblyReferences_Files_)' != '' ">
   <Message
      Text="* Removing files from assembly reference folder ..."
      Importance="high" />
   <Delete
      Files="@(_CleanAssemblyReferences_Files_)" />
</Target>

<!--=============================================================================================-->

<Target
   Name="_CopyFilesToAssemblyReferenceFolder_"
   Condition=" '$(_AssemblyReferenceFolder_)' != '' AND
               '@(_CopyFilesToAssemblyReferenceFolder_Files_)' != '' ">
   <Error Condition=" !Exists( '$(_AssemblyReferenceFolder_)' ) "
          Text="Assembly reference folder not found: &quot;$(_AssemblyReferenceFolder_)&quot;." />
   <Message
      Text="* Copying output files to assembly reference folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToAssemblyReferenceFolder_Files_)'
      DestinationFolder='$(_AssemblyReferenceFolder_)' />
</Target>

<Target
   Name="_CopyFilesToOutputFolder_"
   Condition=" '$(_OutputFolder_)' != '' AND
               '@(_CopyFilesToOutputFolder_Files_)' != '' AND
               Exists( '$(_OutputFolder_)' ) ">
   <Message
      Text="* Copying output files to output folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToOutputFolder_Files_)'
      DestinationFolder='$(_OutputFolder_)' />
</Target>

<Target
   Name="_CopyFilesToClientOutputFolder_"
   Condition=" '$(_ClientOutputFolder_)' != '' AND
               '@(_CopyFilesToClientOutputFolder_Files_)' != '' AND
               Exists( '$(_ClientOutputFolder_)' ) ">
   <Message
      Text="* Copying output files to client output folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToClientOutputFolder_Files_)'
      DestinationFolder='$(_ClientOutputFolder_)' />
</Target>

<Target
   Name="_CopyFilesToServerOutputFolder_"
   Condition=" '$(_ServerOutputFolder_)' != '' AND
               '@(_CopyFilesToServerOutputFolder_Files_)' != '' AND
               Exists( '$(_ServerOutputFolder_)' ) ">
   <Message
      Text="* Copying output files to server output folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToServerOutputFolder_Files_)'
      DestinationFolder='$(_ServerOutputFolder_)' />
</Target>

<Target
   Name="_CopyFilesToOutputFolder_"
   Condition=" '$(_OutputFolder_)' != '' AND
               '@(_CopyFilesToOutputFolder_Files_)' != '' AND
               Exists( '$(_OutputFolder_)' ) ">
   <Message
      Text="* Copying output files to output folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToOutputFolder_Files_)'
      DestinationFolder='$(_OutputFolder_)' />
</Target>

<Target
   Name="_CopyFilesToMetaOutputFolder_"
   Condition=" '$(_MetaOutputFolder_)' != '' AND
               '@(_CopyFilesToMetaOutputFolder_Files_)' != '' ">
   <Message
      Text="* Copying files to meta output folder ..."
      Importance="high" />
   <Copy
      SourceFiles='@(_CopyFilesToMetaOutputFolder_Files_)'
      DestinationFolder='$(_MetaOutputFolder_)' />
</Target>

<Target Name="_CopyToPublishFolder_"
        Condition=" '@(_CopyToPublishFolder_Files_)' != '' ">
   <Error
      Condition=" '$(_PublishFolder_)' == '' "
      Text="Project property was not specified: &quot;_PublishFolder_&quot;." />
   <Message
      Text="* Copying files to publish folder ..."
      Importance="high" />
   <Copy
      SourceFiles="@(_CopyToPublishFolder_Files_)"
      DestinationFolder="$(_PublishFolder_)" />
</Target>

<!--=============================================================================================-->

<Target
   Name="_GenerateFile_PropertiesInfo_CS_"
   Condition=" '$(_OutputFile_PropertiesInfo_CS_)' != '' ">
   <Message
      Text="* Generating file: &quot;$(_OutputFile_PropertiesInfo_CS_)&quot; ..."
      Importance="high" />
   <WriteLinesToFile
      File="$(_OutputFile_PropertiesInfo_CS_)"
      Lines="@(_PropertiesInfo_CS_->'%(Text)')"
      Encoding="UTF-8"
      Overwrite="True" />
</Target>

<!--=============================================================================================-->
<PropertyGroup>
   <BookRegistryCommonTargets_Imported>true</BookRegistryCommonTargets_Imported>
</PropertyGroup>
<!--=============================================================================================-->
</Project>
