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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net9.0</TargetFramework>

    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>

    <!-- 
      Disable central package management for this project.
      This project requires explicit package references with versions specified inline rather than 
      inheriting them from Directory.Packages.props. This is necessary because a Docker image will 
      be created from this project, and the Docker build process only has access to this folder 
      and cannot access parent folders where Directory.Packages.props resides.
    -->
    <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
  </PropertyGroup>

  <!-- 
    Remove analyzer PackageReference items inherited from Directory.Packages.props.
    Note: ManagePackageVersionsCentrally only controls PackageVersion items, not PackageReference items.
    Directory.Packages.props contains both PackageVersion and PackageReference entries for analyzers,
    and the PackageReference items are always inherited through MSBuild imports regardless of the 
    ManagePackageVersionsCentrally setting. We must explicitly remove them before adding our own versions.
  -->
  <ItemGroup>
    <PackageReference Remove="Microsoft.CodeAnalysis.NetAnalyzers" />
    <PackageReference Remove="Microsoft.VisualStudio.Threading.Analyzers" />
    <PackageReference Remove="xunit.analyzers" />
    <PackageReference Remove="Moq.Analyzers" />
    <PackageReference Remove="Roslynator.Analyzers" />
    <PackageReference Remove="Roslynator.CodeAnalysis.Analyzers" />
    <PackageReference Remove="Roslynator.Formatting.Analyzers" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Azure.AI.AgentServer.AgentFramework" Version="1.0.0-beta.4" />
    <PackageReference Include="Azure.AI.OpenAI" Version="2.5.0-beta.1" />
    <PackageReference Include="Azure.Identity" Version="1.17.0" />
    <PackageReference Include="Microsoft.Agents.AI.OpenAI" Version="1.0.0-preview.251110.2" />
    <PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.10.2-preview.1.25552.1" />
  </ItemGroup>

  <!-- Add analyzers with compatible versions -->
  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Roslynator.Analyzers" Version="4.12.9">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.9">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

</Project>
