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

  <PropertyGroup>
    <TargetFrameworks>$(DefaultTargetFrameworks)</TargetFrameworks>
    <Description>SqlClient instrumentation for OpenTelemetry .NET</Description>
    <PackageTags>$(PackageTags);distributed-tracing</PackageTags>
    <IncludeDiagnosticSourceInstrumentationHelpers>true</IncludeDiagnosticSourceInstrumentationHelpers>

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

  <!--Do not run ApiCompat as this package has never released a stable version.
  Remove this property once we have released a stable version.-->
  <PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
    <RunApiCompat>false</RunApiCompat>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="$(RepoRoot)\src\Shared\Guard.cs" Link="Includes\Guard.cs" />
    <Compile Include="$(RepoRoot)\src\Shared\EnvironmentVariables\*.cs" Link="Includes\EnvironmentVariables\%(Filename).cs" />
    <Compile Include="$(RepoRoot)\src\Shared\HttpSemanticConventionHelper.cs" Link="Includes\HttpSemanticConventionHelper.cs" />
    <Compile Include="$(RepoRoot)\src\Shared\Options\*.cs" Link="Includes\Options\%(Filename).cs" />
    <Compile Include="$(RepoRoot)\src\Shared\Shims\NullableAttributes.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(RunningDotNetPack)' == '' OR '$(RunningDotNetPack)' == 'false'">
    <ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Api.ProviderBuilderExtensions\OpenTelemetry.Api.ProviderBuilderExtensions.csproj" />
  </ItemGroup>

  <!-- Instrumentation packages when published should take a dependency only on the latest stable version of the API/SDK. -->
  <ItemGroup Condition="'$(RunningDotNetPack)' == 'true'">
    <PackageReference Include="OpenTelemetry.Api.ProviderBuilderExtensions" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Options" />
    <PackageReference Include="Microsoft.Extensions.Configuration" />
  </ItemGroup>

</Project>
