<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>3.8</ProductVersion>
    <MSIVersionNumber>1.2.0</MSIVersionNumber>
    <ProjectGuid>82a39b31-61ec-468d-aa71-0d949ac6528f</ProjectGuid>
    <SchemaVersion>2.0</SchemaVersion>
    <OutputName>TimberWinR-$(MSIVersionNumber)</OutputName>
    <OutputType>Package</OutputType>
    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
    <Name>TimberWinR.Wix</Name>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
    <DefineConstants>Debug;</DefineConstants>
    <VerboseOutput>True</VerboseOutput>
    <WixVariables>
    </WixVariables>
    <CompilerAdditionalOptions>
    </CompilerAdditionalOptions>
    <LinkerAdditionalOptions>
    </LinkerAdditionalOptions>
    <SuppressIces>ICE40</SuppressIces>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
    <SuppressIces>ICE40</SuppressIces>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Product.wxs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\TimberWinR.ServiceHost\TimberWinR.ServiceHost.csproj">
      <Name>TimberWinR.ServiceHost</Name>
      <Project>{2c0b4c56-0d63-4b89-852b-f9bff4431f00}</Project>
      <Private>True</Private>
      <DoNotHarvest>True</DoNotHarvest>
      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
      <RefTargetDir>INSTALLFOLDER</RefTargetDir>
    </ProjectReference>
    <ProjectReference Include="..\TimberWinR\TimberWinR.csproj">
      <Name>TimberWinR</Name>
      <Project>{4ef96a08-21db-4178-be44-70dae594632c}</Project>
      <Private>True</Private>
      <DoNotHarvest>True</DoNotHarvest>
      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
      <RefTargetDir>INSTALLFOLDER</RefTargetDir>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <WixExtension Include="WixNetFxExtension">
      <HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
      <Name>WixNetFxExtension</Name>
    </WixExtension>
    <WixExtension Include="WixUIExtension">
      <HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
      <Name>WixUIExtension</Name>
    </WixExtension>
  </ItemGroup>
  <Import Project="$(WixTargetsPath)" />
  <Target Name="BeforeBuild">
    <!-- Read the version from the to-be-installed .exe -->
    <GetAssemblyIdentity AssemblyFiles="..\TimberWinR.ServiceHost\bin\$(Configuration)\TimberWinR.ServiceHost.exe">
      <Output TaskParameter="Assemblies" ItemName="AsmInfo" />
    </GetAssemblyIdentity>
    <!-- Create the MSBuild property $(VersionNumber) -->
    <CreateProperty Value="%(AsmInfo.Version)">
      <Output TaskParameter="Value" PropertyName="VersionNumber" />
    </CreateProperty>
    <!-- Create the WiX preprocessor variable $(var.VersionNumber) -->
    <CreateProperty Value="$(DefineConstants);VersionNumber=$(VersionNumber)">
      <Output TaskParameter="Value" PropertyName="DefineConstants" />
    </CreateProperty>
    <!-- Update the MSBuild properties $(TargetName), etc. -->
    <CreateProperty Value="$(SolutionName)-$(VersionNumber)">
      <Output TaskParameter="Value" PropertyName="TargetName" />
    </CreateProperty>
    <CreateProperty Value="$(TargetName)$(TargetExt)">
      <Output TaskParameter="Value" PropertyName="TargetFileName" />
    </CreateProperty>
    <CreateProperty Value="$(TargetName)$(TargetPdbExt)">
      <Output TaskParameter="Value" PropertyName="TargetPdbName" />
    </CreateProperty>
    <CreateProperty Value="$(TargetDir)$(TargetFileName)">
      <Output TaskParameter="Value" PropertyName="TargetPath" />
    </CreateProperty>
    <CreateProperty Value="$(TargetPdbDir)$(TargetPdbName)">
      <Output TaskParameter="Value" PropertyName="TargetPdbPath" />
    </CreateProperty>
    <!-- Update the MSBuild property from which candle.exe args are derived -->
    <CreateProperty Value="&#xD;&#xA;    Configuration=$(ConfigurationName);&#xD;&#xA;    OutDir=$(OutDir);&#xD;&#xA;    Platform=$(PlatformName);&#xD;&#xA;    ProjectDir=$(ProjectDir);&#xD;&#xA;    ProjectExt=$(ProjectExt);&#xD;&#xA;    ProjectFileName=$(ProjectFileName);&#xD;&#xA;    ProjectName=$(ProjectName);&#xD;&#xA;    ProjectPath=$(ProjectPath);&#xD;&#xA;    TargetDir=$(TargetDir);&#xD;&#xA;    TargetExt=$(TargetExt);&#xD;&#xA;    TargetFileName=$(TargetFileName);&#xD;&#xA;    TargetName=$(TargetName);&#xD;&#xA;    TargetPath=$(TargetPath);&#xD;&#xA;  ">
      <Output TaskParameter="Value" PropertyName="ProjectDefineConstants" />
    </CreateProperty>
  </Target>
  <PropertyGroup>
    <PreBuildEvent>mkdir  $(SolutionDir)tools
cmd.exe /c copy $(SolutionDir)chocolateyUninstall.ps1.template.orig  $(SolutionDir)chocolateyUninstall.ps1.template</PreBuildEvent>
  </PropertyGroup>
  <PropertyGroup>
    <PostBuildEvent>$(SolutionDir)\TimberWinR.ExtractID\$(OutDir)\TimberWinR.ExtractID.exe $(TargetDir) $(SolutionDir)chocolateyUninstall.ps1.guid  $(SolutionDir)chocolateyUninstall.ps1.template
cmd.exe /c copy "$(TargetDir)%2a.msi" "$(SolutionDir)tools"</PostBuildEvent>
  </PropertyGroup>
  <!--
	To modify your build process, add your task inside one of the targets below and uncomment it.
	Other similar extension points exist, see Wix.targets.
	
	<Target Name="AfterBuild">
	</Target>
	-->
</Project>