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

    <PropertyGroup>
        <RootNamespace>ZB.MOM.WW.OtOpcUa.Host</RootNamespace>
        <AssemblyName>OtOpcUa.Host</AssemblyName>
        <UserSecretsId>zb-mom-ww-otopcua-host</UserSecretsId>
        <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
        <!-- Microsoft.CodeAnalysis.CSharp.Scripting (4.12.0, pulled in via Core.Scripting for F8b
             user-script compilation) requires CodeAnalysis.Common 4.12.0 exactly, but ASP.NET
             Core's transitive Microsoft.CodeAnalysis.CSharp 5.0.0 wins resolution. Suppress
             NU1608 — the surface we use from Scripting (ScriptEvaluator + RoslynScriptHost) is
             stable across the version drift; verified by Core.Scripting.Tests. -->
        <NoWarn>$(NoWarn);NU1608</NoWarn>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Akka.Hosting"/>
        <PackageReference Include="Serilog.AspNetCore"/>
        <!-- Always referenced (drops earlier IsOSPlatform condition) so Program.cs can
             call builder.Host.UseWindowsService() unconditionally; the runtime helper
             only activates when actually running as a Windows Service, so this is a
             no-op on macOS/Linux. -->
        <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices"/>
        <PackageReference Include="Microsoft.EntityFrameworkCore.Design">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="OpenTelemetry.Extensions.Hosting"/>
        <PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore"/>
        <PackageReference Include="ZB.MOM.WW.Health" />
        <PackageReference Include="ZB.MOM.WW.Health.Akka" />
        <PackageReference Include="ZB.MOM.WW.Health.EntityFrameworkCore" />
        <PackageReference Include="ZB.MOM.WW.Telemetry" />
        <PackageReference Include="ZB.MOM.WW.Telemetry.Serilog" />
        <PackageReference Include="ZB.MOM.WW.Configuration" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Commons\ZB.MOM.WW.OtOpcUa.Commons.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Cluster\ZB.MOM.WW.OtOpcUa.Cluster.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Configuration\ZB.MOM.WW.OtOpcUa.Configuration.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core\ZB.MOM.WW.OtOpcUa.Core.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core.Scripting\ZB.MOM.WW.OtOpcUa.Core.Scripting.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core.VirtualTags\ZB.MOM.WW.OtOpcUa.Core.VirtualTags.csproj"/>
        <ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms\ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.csproj"/>
        <ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.Security\ZB.MOM.WW.OtOpcUa.Security.csproj"/>
        <ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.ControlPlane\ZB.MOM.WW.OtOpcUa.ControlPlane.csproj"/>
        <ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.Runtime\ZB.MOM.WW.OtOpcUa.Runtime.csproj"/>
        <ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.OpcUaServer\ZB.MOM.WW.OtOpcUa.OpcUaServer.csproj"/>
        <ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.AdminUI\ZB.MOM.WW.OtOpcUa.AdminUI.csproj"/>
    </ItemGroup>

    <!-- Cross-platform driver assemblies. Each Register(registry, loggerFactory) extension is
         called from DriverFactoryBootstrap on driver-role nodes; the F7 seam (IDriverFactory)
         then exposes the registry to DriverHostActor. Galaxy is net10 because it talks gRPC to
         the out-of-process mxaccessgw worker — the COM-bound net48 piece is over there.
         The historian read/write backend is the Historian.Gateway driver (gRPC to HistorianGateway);
         the retired Wonderware historian sidecar projects are no longer referenced. -->
    <ItemGroup>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.AbCip\ZB.MOM.WW.OtOpcUa.Driver.AbCip.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.AbLegacy\ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Calculation\ZB.MOM.WW.OtOpcUa.Driver.Calculation.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.FOCAS\ZB.MOM.WW.OtOpcUa.Driver.FOCAS.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Galaxy\ZB.MOM.WW.OtOpcUa.Driver.Galaxy.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway\ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Modbus\ZB.MOM.WW.OtOpcUa.Driver.Modbus.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient\ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.S7\ZB.MOM.WW.OtOpcUa.Driver.S7.csproj"/>
        <ProjectReference Include="..\..\Drivers\ZB.MOM.WW.OtOpcUa.Driver.TwinCAT\ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.csproj"/>
    </ItemGroup>

</Project>
