diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0668653..cee3e06 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,8 +27,6 @@ jobs: - uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: | - 6.0.x - 7.0.x 8.0.x 9.0.x diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index a75f605..3ac137e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -37,8 +37,6 @@ jobs: uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: | - 6.0.x - 7.0.x 8.0.x 9.0.x diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e0e6679..4220b4d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,8 +18,6 @@ jobs: uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: | - 6.0.x - 7.0.x 8.0.x 9.0.x diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 04a5a95..281e9fc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,8 +17,6 @@ jobs: uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: | - 6.0.x - 7.0.x 8.0.x 9.0.x diff --git a/CHANGELOG.md b/CHANGELOG.md index b49ee0a..61f24ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ All notable changes to **ValueStringBuilder** will be documented in this file. T ## [Unreleased] +This is the `v2` release of the **ValueStringBuilder**. There aren't any noticeable changes. Only old framework versions were removed to make further development easier. + +### Removed +- Support for `net6.0` and `net7.0` was removed. + +### Changed +- Added `OverloadResolutionPriority` for `Span` overload for the ctor to keep the current behavior. Reported by [@nsentinel])(https://github.com/nsentinel) in [#210](https://github.com/linkdotnet/StringBuilder/issues/210). + ## [1.22.0] - 2024-12-18 ### Added diff --git a/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj b/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj index 702d5eb..75563dd 100644 --- a/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj +++ b/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0;net9.0 + net8.0;net9.0 enable enable true diff --git a/src/LinkDotNet.StringBuilder/StringSyntaxAttribute.cs b/src/LinkDotNet.StringBuilder/StringSyntaxAttribute.cs deleted file mode 100644 index 7dcdbd7..0000000 --- a/src/LinkDotNet.StringBuilder/StringSyntaxAttribute.cs +++ /dev/null @@ -1,26 +0,0 @@ -#if NET6_0 -namespace System.Diagnostics.CodeAnalysis; - -/// Fake version of the StringSyntaxAttribute, which was introduced in .NET 7. -[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property)] -[SuppressMessage("Design", "CA1019:Define accessors for attribute arguments", Justification = "The sole purpose is to have the same public surface as the class in .NET7 and above.")] -internal sealed class StringSyntaxAttribute : Attribute -{ - /// The syntax identifier for strings containing composite formats. - public const string CompositeFormat = nameof(CompositeFormat); - - /// - /// Initializes a new instance of the class. - /// - public StringSyntaxAttribute(string syntax) - { - } - - /// - /// Initializes a new instance of the class. - /// - public StringSyntaxAttribute(string syntax, params object?[] arguments) - { - } -} -#endif \ No newline at end of file diff --git a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs index f1d8408..0a413ce 100644 --- a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs +++ b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs @@ -36,6 +36,9 @@ public ValueStringBuilder() /// /// Initial buffer for the string builder to begin with. [MethodImpl(MethodImplOptions.AggressiveInlining)] +#if NET9_0_OR_GREATER + [OverloadResolutionPriority(1)] +#endif public ValueStringBuilder(Span initialBuffer) { bufferPosition = 0; diff --git a/tests/LinkDotNet.StringBuilder.Benchmarks/LinkDotNet.StringBuilder.Benchmarks.csproj b/tests/LinkDotNet.StringBuilder.Benchmarks/LinkDotNet.StringBuilder.Benchmarks.csproj index 816326f..c714f0a 100644 --- a/tests/LinkDotNet.StringBuilder.Benchmarks/LinkDotNet.StringBuilder.Benchmarks.csproj +++ b/tests/LinkDotNet.StringBuilder.Benchmarks/LinkDotNet.StringBuilder.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable false diff --git a/tests/LinkDotNet.StringBuilder.UnitTests/LinkDotNet.StringBuilder.UnitTests.csproj b/tests/LinkDotNet.StringBuilder.UnitTests/LinkDotNet.StringBuilder.UnitTests.csproj index 21957f3..ca3ea97 100644 --- a/tests/LinkDotNet.StringBuilder.UnitTests/LinkDotNet.StringBuilder.UnitTests.csproj +++ b/tests/LinkDotNet.StringBuilder.UnitTests/LinkDotNet.StringBuilder.UnitTests.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0;net9.0 + net8.0;net9.0 enable false true @@ -10,8 +10,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all