<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>    
    <Nullable>disable</Nullable>
    <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
    <NoWarn>CA1416;CS8622,CS8769;CS0108;CS8602;CS8601;CS8620;CS8618;CS8603;CS8767;CS8625;CS8604;CS8600;CS8604</NoWarn>    
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="Models\" />
    <AvaloniaResource Include="Assets\**" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\Boneyard\ARM64\MarketData\MarketDataLib\MarketDataLib.csproj" />
  </ItemGroup>

  <!-- Have to copy this shared library manually because publish was deploying an incorrect version of it  
       that was not running on the pi -->
  <ItemGroup>
  <None Update="libSkiaSharp.so">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  </None>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia" Version="11.3.1" />
    <PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.1" />
    <PackageReference Include="Avalonia.Desktop" Version="11.3.1" />
    <PackageReference Include="Avalonia.Labs.CommandManager" Version="11.3.0" />
    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.1" />
    <PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.1" />
    <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
    <PackageReference Include="Avalonia.Diagnostics" Version="11.3.1">
      <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
      <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
    </PackageReference>
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
    <PackageReference Include="Eremex.Avalonia.Controls" Version="1.1.142" />
    <PackageReference Include="Eremex.Avalonia.Themes.DeltaDesign" Version="1.1.142" />
    <PackageReference Include="LoadingIndicators.Avalonia" Version="11.0.11.1" />    
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.5" />    
  </ItemGroup>

  <ItemGroup>
    <None Update="appsettings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <Target Name="PostClean" AfterTargets="Clean">
      <RemoveDir Directories="$(BaseIntermediateOutputPath)" /><!-- obj -->
      <RemoveDir Directories="$(BaseOutputPath)" /><!-- bin -->
  </Target>  
</Project>
