diff --git a/.travis.yml b/.travis.yml index 7aadd0ebd..e06ca9090 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: csharp dist: xenial -dotnet: 5.0.100 +dotnet: 6.0.100 mono: none -env: CONFIGURATION=Release FRAMEWORK=net5.0 +env: CONFIGURATION=Release FRAMEWORK=net6.0 before_script: - dotnet --info diff --git a/Directory.Build.props b/Directory.Build.props index ad3c08ee0..17b46b7aa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ true - true + true latest diff --git a/appveyor.yml b/appveyor.yml index 4f039068e..6ce6a48ed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -os: Visual Studio 2019 +os: Visual Studio 2022 build: off environment: diff --git a/src/NSubstitute/NSubstitute.csproj b/src/NSubstitute/NSubstitute.csproj index 0d3184201..e0ad29718 100644 --- a/src/NSubstitute/NSubstitute.csproj +++ b/src/NSubstitute/NSubstitute.csproj @@ -1,4 +1,4 @@ - + NSubstitute is a friendly substitute for .NET mocking libraries. It has a simple, succinct syntax to help developers write clearer tests. NSubstitute is designed for Arrange-Act-Assert (AAA) testing and with Test Driven Development (TDD) in mind. @@ -16,9 +16,19 @@ - netstandard1.3;netstandard2.0;net45;net46;net5.0 + netstandard1.3;netstandard2.0;net45;net46;net5.0;net6.0 + + + + + + + $(DefineConstants);SYSTEM_REFLECTION_CUSTOMATTRIBUTES_IS_ARRAY + + + true @@ -34,28 +44,18 @@ - enable + enable - $(NoWarn);CS8632 + $(NoWarn);CS8632 - + - - - - - - - $(DefineConstants);SYSTEM_REFLECTION_CUSTOMATTRIBUTES_IS_ARRAY - - - + $(DefineConstants);SYSTEM_DIAGNOSTICS_CODEANALYSIS_NULLABILITY diff --git a/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj b/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj index 6147cab8b..189d1c4e5 100644 --- a/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj +++ b/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj @@ -1,13 +1,13 @@  - netcoreapp2.0;netcoreapp1.1;net46;net45;net5.0 + netcoreapp2.1;net46;net45;net5.0;net6.0 - - - + + + diff --git a/tests/NSubstitute.Benchmarks/ActivationBenchmark.cs b/tests/NSubstitute.Benchmarks/ActivationBenchmark.cs index 27b5a5f29..9f591bb10 100644 --- a/tests/NSubstitute.Benchmarks/ActivationBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/ActivationBenchmark.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; namespace NSubstitute.Benchmarks diff --git a/tests/NSubstitute.Benchmarks/ArgumentSpecificationUsageBenchmark.cs b/tests/NSubstitute.Benchmarks/ArgumentSpecificationUsageBenchmark.cs index 9d257ac0e..233624777 100644 --- a/tests/NSubstitute.Benchmarks/ArgumentSpecificationUsageBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/ArgumentSpecificationUsageBenchmark.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; namespace NSubstitute.Benchmarks diff --git a/tests/NSubstitute.Benchmarks/DispatchConfiguredMatchingCallBenchmark.cs b/tests/NSubstitute.Benchmarks/DispatchConfiguredMatchingCallBenchmark.cs index c282805dd..278d5a5d7 100644 --- a/tests/NSubstitute.Benchmarks/DispatchConfiguredMatchingCallBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/DispatchConfiguredMatchingCallBenchmark.cs @@ -1,7 +1,5 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; -using NSubstitute.Core; namespace NSubstitute.Benchmarks { diff --git a/tests/NSubstitute.Benchmarks/DispatchConfiguredNonMatchingCallBenchmark.cs b/tests/NSubstitute.Benchmarks/DispatchConfiguredNonMatchingCallBenchmark.cs index 430d6c950..7e063e763 100644 --- a/tests/NSubstitute.Benchmarks/DispatchConfiguredNonMatchingCallBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/DispatchConfiguredNonMatchingCallBenchmark.cs @@ -1,7 +1,5 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; -using NSubstitute.Core; namespace NSubstitute.Benchmarks { diff --git a/tests/NSubstitute.Benchmarks/DispatchNonConfiguredCallBenchmark.cs b/tests/NSubstitute.Benchmarks/DispatchNonConfiguredCallBenchmark.cs index 1d6ef0aac..f9d442d94 100644 --- a/tests/NSubstitute.Benchmarks/DispatchNonConfiguredCallBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/DispatchNonConfiguredCallBenchmark.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; namespace NSubstitute.Benchmarks diff --git a/tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj b/tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj index 7ab715831..5234c04e5 100644 --- a/tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj +++ b/tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj @@ -1,7 +1,8 @@  Exe - net462;netcoreapp2.1 + net6.0 + NSubstitute.Benchmarks.Program @@ -11,7 +12,7 @@ - + diff --git a/tests/NSubstitute.Benchmarks/ToStringCallBenchmark.cs b/tests/NSubstitute.Benchmarks/ToStringCallBenchmark.cs index 67d84b1f6..dd6f29e03 100644 --- a/tests/NSubstitute.Benchmarks/ToStringCallBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/ToStringCallBenchmark.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; namespace NSubstitute.Benchmarks diff --git a/tests/NSubstitute.Benchmarks/VerifyReceivedCallBenchmark.cs b/tests/NSubstitute.Benchmarks/VerifyReceivedCallBenchmark.cs index c3e875d68..e334c0ed9 100644 --- a/tests/NSubstitute.Benchmarks/VerifyReceivedCallBenchmark.cs +++ b/tests/NSubstitute.Benchmarks/VerifyReceivedCallBenchmark.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Attributes.Jobs; using NSubstitute.Benchmarks.TestTypes; namespace NSubstitute.Benchmarks