|
1 | | -<Project Sdk="Microsoft.NET.Sdk"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <Description>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.</Description> |
|
16 | 16 | </ItemGroup> |
17 | 17 |
|
18 | 18 | <PropertyGroup> |
19 | | - <TargetFrameworks>netstandard1.3;netstandard2.0;net45;net46;net5.0</TargetFrameworks> |
| 19 | + <TargetFrameworks>netstandard1.3;netstandard2.0;net45;net46;net5.0;net6.0</TargetFrameworks> |
20 | 20 | </PropertyGroup> |
21 | 21 |
|
| 22 | + <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' "> |
| 23 | + <PackageReference Include="System.Linq.Queryable" Version="4.3.0-*" /> |
| 24 | + <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0-*" /> |
| 25 | + </ItemGroup> |
| 26 | + |
| 27 | + <PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.3' "> |
| 28 | + <DefineConstants>$(DefineConstants);SYSTEM_REFLECTION_CUSTOMATTRIBUTES_IS_ARRAY</DefineConstants> |
| 29 | + </PropertyGroup> |
| 30 | + |
| 31 | + |
22 | 32 | <PropertyGroup> |
23 | 33 | <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
24 | 34 | <WarningsAsErrors /> |
|
34 | 44 | </PropertyGroup> |
35 | 45 |
|
36 | 46 | <PropertyGroup> |
37 | | - <Nullable Condition="'$(TargetIsNet5)' == 'true'">enable</Nullable> |
| 47 | + <Nullable Condition="'$(TargetIsNet5OrNewer)' == 'true'">enable</Nullable> |
38 | 48 | <!-- Nullability does not work nicely for older versions of .NET, so just disable nullability for those versions. --> |
39 | 49 | <!-- CS8632 - The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. --> |
40 | | - <NoWarn Condition="'$(TargetIsNet5)' != 'true'">$(NoWarn);CS8632</NoWarn> |
| 50 | + <NoWarn Condition="'$(TargetIsNet5OrNewer)' != 'true'">$(NoWarn);CS8632</NoWarn> |
41 | 51 | </PropertyGroup> |
42 | 52 |
|
43 | 53 | <ItemGroup> |
44 | 54 | <PackageReference Include="Castle.Core" Version="4.4.1-*" /> |
45 | | - <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0-*" |
46 | | - Condition="'$(TargetIsNet5)' != 'true'" /> |
| 55 | + <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0-*" Condition="'$(TargetIsNet5OrNewer)' != 'true'" /> |
47 | 56 | </ItemGroup> |
48 | 57 |
|
49 | | - <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' "> |
50 | | - <PackageReference Include="System.Linq.Queryable" Version="4.3.0-*" /> |
51 | | - <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0-*" /> |
52 | | - </ItemGroup> |
53 | | - |
54 | | - <PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.3' "> |
55 | | - <DefineConstants>$(DefineConstants);SYSTEM_REFLECTION_CUSTOMATTRIBUTES_IS_ARRAY</DefineConstants> |
56 | | - </PropertyGroup> |
57 | | - |
58 | | - <PropertyGroup Condition="'$(TargetIsNet5)' == 'true'"> |
| 58 | + <PropertyGroup Condition="'$(TargetIsNet5OrNewer)' == 'true'"> |
59 | 59 | <DefineConstants>$(DefineConstants);SYSTEM_DIAGNOSTICS_CODEANALYSIS_NULLABILITY</DefineConstants> |
60 | 60 | </PropertyGroup> |
61 | 61 |
|
|
0 commit comments