Files
CommandForge/Directory.Build.props
T
poli0981andClaude Opus 5.5 304693cfa0 build: keep package versions in each .csproj
GitHub's dependency graph reads NuGet versions from .csproj files but not from
Directory.Packages.props, so Central Package Management would have blinded Dependabot alerts,
dependency review and the release SBOM. Versions move back into the projects (same versions),
SonarAnalyzer.CSharp is now referenced from Directory.Build.props, and the xUnit v3 test
project declares OutputType Exe explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:02:41 +07:00

70 lines
3.4 KiB
XML

<Project>
<!--
Shared build settings for all CommandForge projects.
Target frameworks are declared per-project (Domain/Application = net10.0 pure,
the Windows-facing projects = net10.0-windows) to hard-enforce the Clean
Architecture boundary (see docs/architectures.md, golden rule #4).
-->
<PropertyGroup>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Deterministic>true</Deterministic>
<!-- Required so IDE0005 (remove unnecessary usings) runs at build time
(see dotnet/roslyn#41640). CS1591 (missing XML doc) is suppressed so we
don't force XML docs on every public member. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<!-- Supply-chain audit: restore checks direct AND transitive packages against the GitHub
Advisory Database. Moderate+ advisories (NU1902-NU1904) fail the build through
TreatWarningsAsErrors; low-severity ones (NU1901) stay warnings. -->
<NuGetAudit>true</NuGetAudit>
<NuGetAuditMode>all</NuGetAuditMode>
<NuGetAuditLevel>low</NuGetAuditLevel>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901</WarningsNotAsErrors>
<!-- Normalized source paths in PDBs for CI builds (reproducible artifacts). -->
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<!--
Package / assembly metadata, inherited by every project. Surfaced in Settings -> About
and the Report-Bug template (via Assembly.GetName().Version), in the file properties, and
in the Velopack installer (scripts/pack.ps1 passes Authors via the packAuthors flag).
Version here is only the dev-build default; scripts/pack.ps1 overrides it at publish time
with the Version/FileVersion/InformationalVersion properties off the git tag. AssemblyVersion is
intentionally NOT pinned, so it follows Version and the in-app "App version" stays accurate
(binding-redirect churn is a non-issue for a self-contained app, not a shared library).
-->
<PropertyGroup>
<Product>CommandForge</Product>
<Authors>poli0981</Authors>
<Company>poli0981</Company>
<Copyright>Copyright © 2026 poli0981</Copyright>
<Description>Run complex Windows system commands through a visual, categorized interface.</Description>
<RepositoryUrl>https://github.com/poli0981/CommandForge</RepositoryUrl>
<PackageProjectUrl>https://github.com/poli0981/CommandForge</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<Version>2.0.0</Version>
</PropertyGroup>
<!-- Same rules SonarCloud applies, enforced at build time (warnings are errors). Package versions
live in each .csproj: GitHub's dependency graph (Dependabot alerts, dependency review, the
release SBOM) reads .csproj files but not Directory.Packages.props. -->
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.35.0.4138">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>