<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
      <TargetFrameworks>net6.0;netstandard2.0;net461;netcoreapp2.0</TargetFrameworks>
      <PackageId>Avalonia</PackageId>
  </PropertyGroup>

  <ItemGroup>
      <ProjectReference Include="../../src/Avalonia.Remote.Protocol/Avalonia.Remote.Protocol.csproj" />
      <ProjectReference Include="../../src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj" >
        <PrivateAssets>all</PrivateAssets>
      </ProjectReference>  
  </ItemGroup>

  <PropertyGroup>
      <DesignerHostAppPath>../../src/tools</DesignerHostAppPath>
  </PropertyGroup>

  <Target Name="AddDesignerHostAppsToPackage" BeforeTargets="GenerateNuspec">
    <MSBuild Projects="$(DesignerHostAppPath)/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj" Properties="Configuration=$(Configuration);&#xA;                         Platform=$(Platform)" />

    <ItemGroup>
      <_PackageFiles Include="$(DesignerHostAppPath)/Avalonia.Designer.HostApp/bin/$(Configuration)/netcoreapp2.0/Avalonia.Designer.HostApp.dll">
        <PackagePath>tools/netcoreapp2.0/designer</PackagePath>
        <Visible>false</Visible>
        <BuildAction>None</BuildAction>
      </_PackageFiles>
      <_PackageFiles Include="$(DesignerHostAppPath)/Avalonia.Designer.HostApp/bin/$(Configuration)/net461/Avalonia.Designer.HostApp.exe">
        <PackagePath>tools/net461/designer</PackagePath>
        <Visible>false</Visible>
        <BuildAction>None</BuildAction>
      </_PackageFiles>
    </ItemGroup>
  </Target>
  
  <ItemGroup>
    <Content Include="*.props">
       <Pack>true</Pack>
       <PackagePath>build\;buildTransitive\</PackagePath>
    </Content>
    <Content Include="*.targets">
      <Pack>true</Pack>
      <PackagePath>build\;buildTransitive\</PackagePath>
    </Content>
    <Content Include="AvaloniaItemSchema.xaml">
      <Pack>true</Pack>
      <PackagePath>build\;buildTransitive\</PackagePath>
    </Content>
  </ItemGroup>
  <Import Project="..\..\build\SharedVersion.props" />
  <Import Project="..\..\build\NetFX.props" />
  <Import Project="..\..\build\CoreLibraries.props" />
  <Import Project="..\..\build\SourceLink.props" Condition="'$(DisableSourceLink)' == ''" />
</Project>
