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
38 changes: 38 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project>

<!--
Central Package Management (CPM). One source of truth for every NuGet version in the repository: projects
declare <PackageReference Include="..." /> WITHOUT a Version, and the version is resolved from the matching
<PackageVersion> below. This keeps versions consistent across the projects and makes the `dotnet restore`
steps in ci.yml / release.yml reproducible — which is also what OpenSSF Scorecard's Pinned-Dependencies
check rewards (an unpinned restore otherwise caps that check below 10, via "nugetCommand not pinned").

Two deliberate exceptions:
* FirstClassErrors.Analyzers pins Microsoft.CodeAnalysis.CSharp to $(RoslynFloorVersion) via a
VersionOverride, so the load-contract floor stays property-driven and independent of the (newer)
central version the analyzer test project consumes.
* tools/floor-check/FloorCheck.csproj opts OUT of CPM (ManagePackageVersionsCentrally=false): it consumes
the FirstClassErrors package at a dynamic $(FloorCheckVersion) and is built in isolation, outside the
solution.
-->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
<PackageVersion Include="FsCheck" Version="3.3.3" />
<PackageVersion Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.6.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="4.1.5" />
<PackageVersion Include="NFluent" Version="3.1.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.55.0" />
<PackageVersion Include="Verify.XunitV3" Version="31.22.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="xunit.v3" Version="3.2.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NFluent" Version="3.1.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NFluent" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions FirstClassErrors.Analyzers/FirstClassErrors.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
and loaded by each consumer's compiler, so a higher version makes it silently fail to load (CS8032)
on older SDKs/IDEs. The floor lives once in Directory.Build.props and is enforced by RoslynFloorTests.
Microsoft.CodeAnalysis.Analyzers is only a build-time authoring analyzer (PrivateAssets=all), not part
of the load contract, so it is free to move. -->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynFloorVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="5.6.0" PrivateAssets="all">
of the load contract, so it is free to move. Under Central Package Management (Directory.Packages.props)
the floor is expressed as a VersionOverride so it stays property-driven and independent of the newer
central Microsoft.CodeAnalysis.CSharp version the analyzer tests consume. -->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" VersionOverride="$(RoslynFloorVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NFluent" Version="3.1.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NFluent" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/FirstClassErrors.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Spectre.Console.Cli" Version="0.55.0" />
<PackageReference Include="Spectre.Console.Cli" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NFluent" Version="3.1.0" />
<PackageReference Include="Verify.XunitV3" Version="31.22.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NFluent" />
<PackageReference Include="Verify.XunitV3" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- FsCheck drives the property-based (fuzzing-style) tests. The bare `using FsCheck;` in each test file
is also what OpenSSF Scorecard's Fuzzing check looks for to credit C# property-based testing. -->
<PackageReference Include="FsCheck" Version="3.3.3" />
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="FsCheck" />
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Testing/FirstClassErrors.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
(_manifest/spdx_2.2/manifest.spdx.json), so the inventory of files and dependencies travels with
the artifact and is covered by the release's provenance attestation. Build-time only
(PrivateAssets=all): consumers never see this as a dependency. -->
<PackageReference Include="Microsoft.Sbom.Targets" Version="4.1.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Sbom.Targets" PrivateAssets="all" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions FirstClassErrors.UnitTests/FirstClassErrors.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NFluent" Version="3.1.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NFluent" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors/FirstClassErrors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
(_manifest/spdx_2.2/manifest.spdx.json), so the inventory of files and dependencies travels with
the artifact and is covered by the release's provenance attestation. Build-time only
(PrivateAssets=all): consumers never see this as a dependency. -->
<PackageReference Include="Microsoft.Sbom.Targets" Version="4.1.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Sbom.Targets" PrivateAssets="all" />
</ItemGroup>

<!-- Ship the analyzers inside this package (analyzers/dotnet/cs) so package consumers get them automatically.
Expand Down
4 changes: 4 additions & 0 deletions tools/floor-check/FloorCheck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
stays the only escalation. -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors>
<!-- Opt out of repo-wide Central Package Management (Directory.Packages.props, imported from the repo
root): this project consumes the FirstClassErrors package at a dynamic $(FloorCheckVersion) and is
built in isolation, outside the solution, so it keeps its version inline. -->
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>

<PropertyGroup>
Expand Down