<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
  </PropertyGroup>

  <PropertyGroup Condition="'$(RunAotCompilation)' == 'true'">
    <IlcTrimMetadata>true</IlcTrimMetadata>
    <RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json</RestoreAdditionalProjectSources>
    <NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
    <ProjectReference Include="..\..\src\Avalonia.Headless.Vnc\Avalonia.Headless.Vnc.csproj" />
    <ProjectReference Include="..\..\src\Avalonia.Dialogs\Avalonia.Dialogs.csproj" />
    <ProjectReference Include="..\..\src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj" />
    <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" />
    <ProjectReference Include="..\..\src\Avalonia.X11\Avalonia.X11.csproj" />
    <PackageReference Include="Avalonia.Angle.Windows.Natives" Version="2.1.0.2020091801" />
  </ItemGroup>

  <ItemGroup Condition="'$(RunAotCompilation)' == 'true'">
    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
    <!-- Cross-compilation for Windows x64-arm64 and Linux x64-arm64 -->
    <PackageReference Condition="'$(RuntimeIdentifier)'=='win-arm64'" Include="runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
    <PackageReference Condition="'$(RuntimeIdentifier)'=='linux-arm64'" Include="runtime.linux-x64.Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
    <RdXmlFile Include="rd.xml" />
  </ItemGroup>

  <PropertyGroup>
    <!-- For Microsoft.CodeAnalysis -->
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
  </PropertyGroup>

  <Import Project="..\..\build\SampleApp.props" />
  <Import Project="..\..\build\ReferenceCoreLibraries.props" />
</Project>
