Guidance for AI agents working in this repo. Keep it short — this complements the docs, it does not replace them. When something here and a linked doc disagree, the doc wins; fix this file.
fieldcure-toolhost ships two NuGet packages that run .NET tools from NuGet
without the .NET SDK — a dnx-compatible bridge for runtime-only hosts
(MS Store / MSIX apps, containers, CI bootstrappers).
FieldCure.ToolHost— the library (src/FieldCure.ToolHost)FieldCure.ToolHost.Cli— thefcdnxCLI (src/FieldCure.ToolHost.Cli,PackAsTool=true)
Architecture and per-component behavior live in docs/architecture.md; flag semantics and their library mapping in docs/flag-compatibility.md.
The hard rule: dnx parity only. Features that dnx does not have are out of
scope and PRs/requests for them get politely closed (see README.md →
"In scope / Out of scope" and CONTRIBUTING.md). The single
sanctioned exception is narrow host-safety controls (e.g. environment-inheritance
isolation). When in doubt, the answer is "no, that belongs in dotnet/sdk."
Defaults must match dnx behavior. Any safety/isolation feature is opt-in and
leaves the default path byte-for-byte dnx-compatible.
dotnet build FieldCure.ToolHost.slnx -c Release
dotnet test FieldCure.ToolHost.slnx -c Release --filter "Category!=Integration"- Multi-targets net8.0 + net10.0; both must build and pass.
TreatWarningsAsErrors=trueandEnforceCodeStyleInBuild=true(seeDirectory.Build.props) — a warning fails the build. Don't suppress; fix, or add a justifiedNoWarnwith a comment like the existing ones.- Integration tests (network + nuget.org) run only with
RUN_INTEGRATION=1.
- XML doc on every method, including
private/internal—GenerateDocumentationFileis on and this is a FieldCure-portfolio house rule, not just public-API hygiene. - Nullable enabled, implicit usings,
LangVersion=latest. - Match the surrounding style (records for requests,
LoggerMessage/ILoggerpatterns, curated platform branches keyed offOperatingSystem.IsWindows()/ RID).
The two packages ship in lock-step: every release bumps both <Version>
properties to the same number even if only one changed. Rationale (the CLI embeds
the library DLL and does not declare it as a NuGet dependency) is in
CONTRIBUTING.md → "Versioning policy" and scripts/README.md.
A release touches exactly these files (see any Release vX.Y.Z commit for the shape):
RELEASENOTES.ToolHost.mdandRELEASENOTES.ToolHost.Cli.md— rename the## Unreleasedsection to## vX.Y.Z (YYYY-MM-DD).- Both
.csproj— bump<Version>and refresh<PackageReleaseNotes>.
Then:
- Stop before committing. The maintainer makes the
Release vX.Y.Zcommit themselves. Do the edits + verify build/test green, then hand off. - Tags are automatic. GitHub Actions creates the
vX.Y.Zgit tag — never tag manually. - Publish is local, via
scripts/publish-nuget.ps1(pack → sign with the GlobalSign EV USB dongle → push). One script publishes both packages and keeps the lock-step automatic.publish-toolhost.ps1/publish-cli.ps1are for prereleases/hotfixes only. Requires the dongle plugged in andNUGET_API_KEYset.
Version line: stay on the v0.1.x patch line for additive work; v0.2.0 is reserved
for the roadmap items in ROADMAP.md (RID-graph traversal, NativeAOT, etc.).