<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop" ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\..\..\writer.build.settings" />
  <PropertyGroup>
    <AssemblyName>OpenLiveWriter.CoreServices</AssemblyName>
    <RootNamespace>OpenLiveWriter.CoreServices</RootNamespace>
    <ProjectGuid>{9154B6B4-F2C3-4FB4-BE38-A26A6C9409EE}</ProjectGuid>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <UseWindowsForms>true</UseWindowsForms>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Design" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Security" />
    <Reference Include="System.Web" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="OpenLiveWriter.Interop.SHDocVw">
      <Name>OpenLiveWriter.Interop.SHDocVw</Name>
      <HintPath>..\OpenLiveWriter.Interop\Com\OpenLiveWriter.Interop.SHDocVw.dll</HintPath>
    </Reference>
    <ProjectReference Include="..\MarketXmlGenerator\MarketXmlGenerator.csproj">
      <Project>{d286c651-2ae7-447e-bbd8-b82f1c542667}</Project>
      <Name>MarketXmlGenerator</Name>
    </ProjectReference>
    <ProjectReference Include="..\OpenLiveWriter.BrowserControl\OpenLiveWriter.BrowserControl.csproj">
      <Name>OpenLiveWriter.BrowserControl</Name>
      <Project>{A5C213F6-F0C6-4FD6-B496-61FE434621A6}</Project>
      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
    </ProjectReference>
    <ProjectReference Include="..\OpenLiveWriter.HtmlParser\OpenLiveWriter.HtmlParser.csproj">
      <Name>OpenLiveWriter.HtmlParser</Name>
      <Project>{8B905D4B-EE76-4EEE-83CC-C9028B2F16AE}</Project>
      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
    </ProjectReference>
    <ProjectReference Include="..\OpenLiveWriter.Interop.Mshtml\OpenLiveWriter.Interop.Mshtml.csproj">
      <Name>OpenLiveWriter.Interop.Mshtml</Name>
      <Project>{102B4586-3CDB-4DC2-A918-8377B6915BB4}</Project>
      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
    </ProjectReference>
    <ProjectReference Include="..\OpenLiveWriter.Interop\OpenLiveWriter.Interop.csproj">
      <Name>OpenLiveWriter.Interop</Name>
      <Project>{0937EF37-EB01-48E2-885B-991044877712}</Project>
      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
    </ProjectReference>
    <ProjectReference Include="..\OpenLiveWriter.Localization\OpenLiveWriter.Localization.csproj">
      <Name>OpenLiveWriter.Localization</Name>
      <Project>{DF928A2F-38E3-4B1F-83CE-1FDFDE836D84}</Project>
      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\GlobalAssemblyInfo.cs" />
    <EmbeddedResource Include="Diagnostics\Images\ErrorLogoSmall.png" />
    <EmbeddedResource Include="Images\ApplicationIcon.ico" />
    <EmbeddedResource Include="Images\SplashScreen.png" />
    <EmbeddedResource Include="Marketization\Markets.xml" />
    <EmbeddedResource Include="Marketization\Master.xml" />
  </ItemGroup>
  <ItemGroup>
    <BinplaceCompiled Include="$(OutputPath)$(TargetFileName)">
      <DestinationFolder>$(TargetProjectPath)</DestinationFolder>
    </BinplaceCompiled>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Images\SplashScreenLogo.jpg" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(RepoRoot)\writer.build.targets" />
  <PropertyGroup>
    <MasterXmlPath>$(MSBuildProjectDirectory)\..\..\..\intl\markets\Master.xml</MasterXmlPath>
    <MasterXmlOutput>$(MSBuildProjectDirectory)\Marketization\Master.xml</MasterXmlOutput>
    <MarketsXmlPath>$(MSBuildProjectDirectory)\Marketization\Markets.xml</MarketsXmlPath>
    <MarketsSourceDataFolder>$(MSBuildProjectDirectory)\..\..\..\intl\markets</MarketsSourceDataFolder>
  </PropertyGroup>
  <Target Name="GenerateMarketXmlDeps">
    <ItemGroup>
      <MarketsSourceFiles Include="$(MarketsSourceDataFolder)\**\*.xml" />
    </ItemGroup>
  </Target>

  <Target Name="GenerateMarketXml" DependsOnTargets="ResolveProjectReferences;GenerateMarketXmlDeps;GenerateMarketXmlCopyMaster;GenerateMarketXmlImpl" BeforeTargets="CoreCompile">
  </Target>
  
  <Target Name="GenerateMarketXmlImpl" Inputs="@(MarketsSourceFiles)" Outputs="$(MarketsXmlPath)">
    <Exec Command="&quot;$(OutDir)MarketXmlGenerator.exe&quot; &quot;$(MarketsSourceDataFolder)&quot; &quot;$(MarketsXmlPath)&quot;" />
  </Target>

  <Target Name="GenerateMarketXmlCopyMaster" Inputs="$(MasterXmlPath)" Outputs="$(MasterXmlOutput)">
    <MakeDir Directories="$(MSBuildProjectDirectory)\Marketization" Condition="!Exists('$(MSBuildProjectDirectory)\Marketization')" />
    <Copy SourceFiles="$(MasterXmlPath)" DestinationFiles="$(MasterXmlOutput)" />
  </Target>

  <Target Name="_CopyFilesMarkedCopyLocal" />

</Project>