Files
lmxopcua/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.csproj
T
Joseph Doherty 919009c5ef fix(ablegacy): stamp health from the injectable Clock; drop the redundant per-project TreatWarningsAsErrors (lmxopcua#768)
AbLegacyDriver stamped LastSuccessfulRead (init, read, write), the read's sample
timestamps and host-state change times from raw DateTime.UtcNow; only the backoff
path read the injectable Clock. All of them now read Clock(), so
NativePcccBridgeStatusHealthTests drives a manual clock (init at T0, read at T1)
and asserts LastSuccessfulRead == T1 exactly instead of spin-waiting for the wall
clock to pass the init stamp (#767). Without the driver change the 6 tests fail
(init stamp is wall-clock, not T0).

Directory.Build.props sets TreatWarningsAsErrors for every project since #766, so
the 75 per-csproj copies (64 src + 11 tests) are removed and the props comment
says it is now the only place. tools/mem-probe keeps its explicit opt-out.
Release build: 0 warnings, 0 errors; a planted CS0168 still fails the build in a
src project and in a test project that used to carry its own copy.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
2026-11-09 13:40:07 -05:00

46 lines
2.6 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<RootNamespace>ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\ZB.MOM.WW.OtOpcUa.Commons\ZB.MOM.WW.OtOpcUa.Commons.csproj" />
<ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts\ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.csproj" />
<!--
The layering exception this project used to carry is GONE (Gitea #526). It referenced the
runtime Driver.Sql project, and the AdminUI references this browser: the AdminUI's
build/deploy graph therefore pulled in the whole SQL driver runtime and, through it,
ZB.MOM.WW.OtOpcUa.Core.
The premise of the old comment was sound and survives — the dialect's catalog SQL
(ISqlDialect / SqlServerDialect) *is* the browse engine, so it must be SHARED here rather
than duplicated. What was wrong was the conclusion that sharing it required a reference to
the runtime driver. Those two types depend on nothing from Driver.Sql, so they now live in
the .Dialect leaf below, referenced by the runtime driver and by this browser alike.
Note this is the .Transport shape, not the cheap one: ISqlDialect exposes DbProviderFactory
and SqlServerDialect returns SqlClientFactory.Instance, so the dialect cannot move into
.Contracts (deliberately provider-free) — it needs a leaf of its own.
MEASURED, not assumed: after this change ZB.MOM.WW.OtOpcUa.Driver.Sql.dll and
ZB.MOM.WW.OtOpcUa.Core.dll are both absent from the AdminUI's output, and both were present
immediately before it. #512 removed the matching MQTT reference and expected Core to
disappear with it; it did not, because this project was the remaining cause.
The transitive Microsoft.Data.SqlClient on AdminUI is unchanged and remains accepted —
AdminUI already carries SqlClient for ConfigDb. Design doc context, still worth reading
before changing the sharing decision: docs/plans/2026-07-15-sql-poll-driver-design.md §2.
Guarded by DriverBrowserLayeringTests, which scans every *.Browser csproj in the tree.
-->
<ProjectReference Include="..\ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect\ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.csproj" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.Tests"/>
</ItemGroup>
</Project>