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

  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
    <OutputType>Exe</OutputType>
    <LangVersion>9.0</LangVersion>
    <Nullable>enable</Nullable>
    <IsPackable>false</IsPackable>
    <RootNamespace>ZB.MOM.WW.LmxProxy.Host</RootNamespace>
    <AssemblyName>ZB.MOM.WW.LmxProxy.Host</AssemblyName>
    <!-- Force x86 architecture for all configurations (required by ArchestrA.MXAccess) -->
    <PlatformTarget>x86</PlatformTarget>
    <Platforms>x86</Platforms>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Grpc.Core" Version="2.46.6"/>
    <PackageReference Include="Grpc.Tools" Version="2.51.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Google.Protobuf" Version="3.21.12"/>
    <PackageReference Include="Topshelf" Version="4.3.0"/>
    <PackageReference Include="Topshelf.Serilog" Version="4.3.0"/>
    <PackageReference Include="Serilog" Version="2.10.0"/>
    <PackageReference Include="Serilog.Sinks.Console" Version="4.0.1"/>
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0"/>
    <PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0"/>
    <PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0"/>
    <PackageReference Include="System.Threading.Channels" Version="4.7.1"/>
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.32"/>
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.32"/>
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.32"/>
    <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.32"/>
    <PackageReference Include="Polly" Version="7.2.4"/>
    <PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.1.32"/>
    <PackageReference Include="System.Memory" Version="4.5.5"/>
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1"/>
  </ItemGroup>

  <ItemGroup>
    <Reference Include="ArchestrA.MXAccess">
      <HintPath>..\..\lib\ArchestrA.MXAccess.dll</HintPath>
      <Private>true</Private>
    </Reference>
  </ItemGroup>

  <ItemGroup>
    <Protobuf Include="Grpc\Protos\*.proto" GrpcServices="Both"/>
  </ItemGroup>

  <ItemGroup>
    <None Update="appsettings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="appsettings.*.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="App.config">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

</Project>
