Drop support for .NET Core by dennisdoomen · Pull Request #2302 · fluentassertions/fluentassertions · GitHub
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01_bug_report.yml
8 changes: 4 additions & 4 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"SpellCheck",
"TestFrameworks",
"UnitTests",
"UnitTestsNetCore",
"UnitTestsNetFramework"
"UnitTestsNetFramework",
"UnitTestsNewerFrameworks"
]
}
},
Expand All @@ -110,8 +110,8 @@
"SpellCheck",
"TestFrameworks",
"UnitTests",
"UnitTestsNetCore",
"UnitTestsNetFramework"
"UnitTestsNetFramework",
"UnitTestsNewerFrameworks"
]
}
},
Expand Down
10 changes: 5 additions & 5 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ class Build : NukeBuild
);
});

Target UnitTestsNetCore => _ => _
Target UnitTestsNewerFrameworks => _ => _
.Unlisted()
.DependsOn(Compile)
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
.Executes(() =>
{
const string NET47 = "net47";
const string net47 = "net47";

DotNetTest(s => s
.SetConfiguration(Configuration.Debug)
Expand All @@ -208,20 +208,20 @@ class Build : NukeBuild
(_, project) => _
.SetProjectFile(project)
.CombineWith(
project.GetTargetFrameworks().Except(new[] { NET47 }),
project.GetTargetFrameworks().Except(new[] { net47 }),
(_, framework) => _
.SetFramework(framework)
.AddLoggers($"trx;LogFileName={project.Name}_{framework}.trx")
)
), completeOnFailure: true
);

ReportTestOutcome(globFilters: $"*[!*{NET47}].trx");
ReportTestOutcome(globFilters: $"*[!*{net47}].trx");
});

Target UnitTests => _ => _
.DependsOn(UnitTestsNetFramework)
.DependsOn(UnitTestsNetCore);
.DependsOn(UnitTestsNewerFrameworks);

static string[] Outcomes(AbsolutePath path)
=> XmlTasks.XmlPeek(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![open issues](https://img.shields.io/github/issues/fluentassertions/fluentassertions)](https://github.com/fluentassertions/fluentassertions/issues)
![](https://img.shields.io/badge/release%20strategy-githubflow-orange.svg)

A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1.
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET 6, .NET Standard 2.0 and 2.1.

See https://www.fluentassertions.com for [background information](https://fluentassertions.com/about/), [usage documentation](https://fluentassertions.com/introduction), an [extensibility guide](https://fluentassertions.com/extensibility/), support information and more [tips & tricks](https://fluentassertions.com/tips/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static bool IsIndexQualifier(string segment) =>

public int GetHashCode(string obj)
{
#if NETCOREAPP2_1_OR_GREATER
#if NET6_0_OR_GREATER || NETSTANDARD2_1
return obj.GetHashCode(StringComparison.Ordinal);
#else
return obj.GetHashCode();
Expand Down
2 changes: 1 addition & 1 deletion Src/FluentAssertions/Common/Services.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static Configuration Configuration
public static void ResetToDefaults()
{
Reflector = new FullFrameworkReflector();
#if NETFRAMEWORK || NETCOREAPP
#if NETFRAMEWORK || NET6_0_OR_GREATER
ConfigurationStore = new ConfigurationStoreExceptionInterceptor(new AppSettingsConfigurationStore());
#else
ConfigurationStore = new NullConfigurationStore();
Expand Down
24 changes: 3 additions & 21 deletions Src/FluentAssertions/FluentAssertions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- To reduce build times, we only enable analyzers for the newest TFM -->
<PropertyGroup>
<TargetFrameworks>net47;net6.0;netcoreapp2.1;netcoreapp3.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net47;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>FluentAssertions.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -18,15 +18,15 @@
<Authors>Dennis Doomen;Jonas Nyrup</Authors>
<PackageDescription>
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or
BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, .NET 6, as well as .NET Standard 2.0 and 2.1.
BDD-style unit tests. Targets .NET Framework 4.7, .NET 6, as well as .NET Standard 2.0 and 2.1.
Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.

Supported by InfoSupport B.V.
</PackageDescription>
<PackageProjectUrl>https://www.fluentassertions.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/fluentassertions/fluentassertions</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>MSTest2;xUnit;NUnit;MSpec;NSpec;TDD;BDD;Fluent;netcore;netstandard;uwp</PackageTags>
<PackageTags>MSTest2;xUnit;NUnit;MSpec;NSpec;TDD;BDD;Fluent;netstandard;uwp</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>FluentAssertions.png</PackageIcon>
<PackageReleaseNotes>See https://fluentassertions.com/releases/</PackageReleaseNotes>
Expand Down Expand Up @@ -62,24 +62,6 @@
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<ItemGroup>
<Compile Remove="Common/NullConfigurationStore.cs" />
<Compile Remove="SystemExtensions.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<ItemGroup>
<Compile Remove="Common/NullConfigurationStore.cs" />
<Compile Remove="SystemExtensions.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
<ItemGroup>
<Compile Remove="Common/AppSettingsConfigurationStore.cs" />
Expand Down
4 changes: 2 additions & 2 deletions Src/FluentAssertions/Streams/BufferedStreamAssertions.cs
Loading