<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Description>Unit test project for OpenTelemetry Grpc for .NET instrumentation</Description>
    <!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
    <TargetFrameworks>net7.0;net6.0</TargetFrameworks>
    <TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
    <NoWarn>$(NoWarn),CS8981</NoWarn>

    <!-- this is temporary. will remove in future PR. -->
    <Nullable>disable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <Protobuf Include="Proto\greet.proto" GrpcServices="Client;Server" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Google.Protobuf" />
    <PackageReference Include="Grpc.AspNetCore.Server" Condition="'$(TargetFramework)' != 'net462'" />
    <PackageReference Include="Grpc.Net.Client"  />
    <PackageReference Include="Grpc.Tools" PrivateAssets="All" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" />
    <PackageReference Include="Moq" />
    <PackageReference Include="xunit" />
    <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Net.Http" Condition="'$(TargetFramework)' == 'net462'" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' != 'net462'">
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.InMemory\OpenTelemetry.Exporter.InMemory.csproj" />
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Propagators\OpenTelemetry.Extensions.Propagators.csproj" />
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.GrpcNetClient\OpenTelemetry.Instrumentation.GrpcNetClient.csproj" />
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Instrumentation.Http\OpenTelemetry.Instrumentation.Http.csproj" />
    <Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\EventSourceTestHelper.cs" Link="EventSourceTestHelper.cs" />
    <Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\TestEventListener.cs" Link="TestEventListener.cs" />
  </ItemGroup>

</Project>
