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
9 changes: 8 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
</PropertyGroup>

<PropertyGroup Label="Language">
<LangVersion>12</LangVersion>
<!--
C# 14 rather than 12 because the Polyfill package's sources use extension members
(`extension(Byte) { ... }`), and those do not parse below 14. Nothing in this repository
relies on a 13/14 feature otherwise; raising the ceiling does not change how the existing
code compiles, and the language version is independent of the target frameworks, so the
netstandard2.0 assets are unaffected.
-->
<LangVersion>14</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand Down
7 changes: 7 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
-->
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
<!--
Polyfill supplies the BCL APIs the test suite uses but netstandard2.0/net48 lack:
the non-generic TaskCompletionSource and Task.WaitAsync among them. It is a source-only package
(developmentDependency, no lib/), so it compiles in and never becomes a dependency of
anything. It requires LangVersion 14; see the Language block in Directory.Build.props.
-->
<PackageVersion Include="Polyfill" Version="11.3.0" />
<!--
PublicApiGenerator renders the approved public-API surface (see PublicApiSurfaceTests). It is
a test-only tool, never a dependency of a shipped package, so it carries PrivateAssets="all"
Expand Down
99 changes: 0 additions & 99 deletions tests/CanKit.Pro.Tests/Infrastructure/TaskWaitAsyncPolyfill.cs

This file was deleted.

10 changes: 10 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@
<PackageReference Include="PublicApiGenerator">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!--
Source-only: `compile` brings the polyfill sources in, `contentfiles` is how they are
delivered, and `build` supplies the .targets that sets the per-TFM DefineConstants deciding
which of them apply. The package adds `global using global::Polyfills;` itself, so the
extension-method polyfills need no using directive at any call site.
-->
<PackageReference Include="Polyfill">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; analyzers; contentfiles</IncludeAssets>
</PackageReference>
<!--
coverlet.collector 10.x ships build assets for net8.0 and newer only; there is nothing in it
for a .NET Framework test host. Referencing it there would put an unusable collector on the
Expand Down