Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ floor.
- Adopted the canonical `.gitignore` and `.editorconfig`. The `.editorconfig` change
scopes the private-field naming rule to instance fields — a `const` is a field, so
the rule previously demanded `_nonceSize` for `private const int NonceSize`.
- Moved the build properties shared by both projects out of the individual csprojs
and into the root `Directory.Build.props`. Both projects previously restated the
same fifteen properties, which is fifteen chances for one copy to drift silently.
Each csproj now carries only what is specific to it. `Directory.Packages.props`
also gains `CentralPackageVersionOverrideEnabled=false`, so a stray inline
`Version=` on a `PackageReference` is now an `NU1008` restore failure instead of
being silently ignored in favour of the central version. Verified to be a
no-op for consumers: packing at the same commit from a clean `obj/` before and
after produces a byte-identical `.nuspec`, byte-identical `net8.0` and `net10.0`
assemblies and XML docs, and identical `README.md`, icon and package metadata —
the only difference anywhere in the package is the `.psmdcp` filename, which NuGet
regenerates on every pack.

### Added

Expand Down
44 changes: 38 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Authors>Stuart Meeks</Authors>
<Company>Next Iteration</Company>
</PropertyGroup>

<!--
Properties identical across every project in this repo. STANDARD.md 1.2.

They used to be restated in each csproj. Fifteen copies of a property is
fifteen chances for one of them to drift, and the drift is silent — nothing
fails when a csproj quietly disagrees with its sibling about DebugType. A
csproj below carries only what is genuinely specific to it: PackageId,
Version, Description, PackageTags, TargetFrameworks, the package's own URLs,
and any real exception (the test project opting out of
GenerateDocumentationFile, because sample and fixture code has no XML docs
and TreatWarningsAsErrors would fail the build over it).

EnforceCodeStyleInBuild is deliberately NOT here. STANDARD.md 1.2.1 is
blocked: TreatWarningsAsErrors promotes every advisory .editorconfig
preference to a hard failure, which produced 490 build errors in a sibling
repo. It needs a per-rule gate-versus-advisory decision first.
-->
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnablePackageValidation>true</EnablePackageValidation>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>© Stuart Meeks</Copyright>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Authors>Stuart Meeks</Authors>
<Company>Next Iteration</Company>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!--
Hard-fail if a csproj declares <PackageReference Version="…" /> alongside
CPM. Without this MSBuild silently ignores the inline version and uses the
central one — which is the exact drift this file exists to prevent, and it
prevents it without ever saying so. See STANDARD.md 1.3.
-->
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<!--
Only what is specific to this project. Everything shared with the test
project lives in the root Directory.Build.props (STANDARD.md 1.2).
-->
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>

<PropertyGroup>
<PackageId>NextIteration.SpectreConsole.Settings</PackageId>
<Version>0.3.0</Version>
<Authors>Stuart Meeks</Authors>
<Description>Strongly-typed, JSON-persisted settings for CLI tools, with automatic or explicit persistence and ready-made Spectre.Console settings commands.</Description>
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
<PackageOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\packages</PackageOutputPath>
<IncludeBuildOutput>true</IncludeBuildOutput>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/StuartMeeks/NextIteration.SpectreConsole.Settings</PackageProjectUrl>
<RepositoryUrl>https://github.com/StuartMeeks/NextIteration.SpectreConsole.Settings.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>spectre;cli;settings;configuration;json</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<Copyright>© Stuart Meeks</Copyright>
<EnablePackageValidation>true</EnablePackageValidation>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DebugType>portable</DebugType>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
<!-- xUnit.net v3 test projects are self-hosting executables, not
libraries loaded by an external runner. -->
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<!-- Opts out of the Directory.Build.props default. Test and fixture code
carries no XML docs, and TreatWarningsAsErrors would fail the build
over every missing one. -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<!--
CA1707 (no underscores in member names) is the xUnit-naming
Expand Down