Skip to content

Commit 54e3f9e

Browse files
committed
Add .NET 5 target framework
1 parent 6fa75cd commit 54e3f9e

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### unreleased
2+
* [NEW] Add .NET 5 support
23

34
### 4.2.2 (Jun 2020)
45

Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<Project>
22

33
<!-- Contains global properties for all projects in the solution.
4-
These can be overridden in inner folders, if necessary.
4+
These can be overridden in inner folders, if necessary.
55
See more here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019 -->
6-
6+
77
<PropertyGroup>
88
<TargetIsNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</TargetIsNetFx>
9+
<TargetIsNet5 Condition="'$(TargetFramework)' == 'net5.0'">true</TargetIsNet5>
910
<LangVersion>latest</LangVersion>
1011
</PropertyGroup>
1112

src/NSubstitute/NSubstitute.csproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ItemGroup>
1717

1818
<PropertyGroup>
19-
<TargetFrameworks>netstandard1.3;netstandard2.0;net45;net46</TargetFrameworks>
19+
<TargetFrameworks>netstandard1.3;netstandard2.0;net45;net46;net5.0</TargetFrameworks>
2020
</PropertyGroup>
2121

2222
<PropertyGroup>
@@ -35,19 +35,15 @@
3535

3636
<ItemGroup>
3737
<PackageReference Include="Castle.Core" Version="4.4.0-*" />
38-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0-*" />
38+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0-*"
39+
Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))" />
3940
</ItemGroup>
4041

4142
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
4243
<PackageReference Include="System.Linq.Queryable" Version="4.3.0-*" />
4344
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0-*" />
4445
</ItemGroup>
4546

46-
<ItemGroup Condition="'$(TargetIsNetFx)' == 'true'">
47-
<Reference Include="System" />
48-
<Reference Include="Microsoft.CSharp" />
49-
</ItemGroup>
50-
5147
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.3' ">
5248
<DefineConstants>$(DefineConstants);SYSTEM_REFLECTION_CUSTOMATTRIBUTES_IS_ARRAY</DefineConstants>
5349
</PropertyGroup>

tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0;netcoreapp1.1;net46;net45</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.0;netcoreapp1.1;net46;net45;net5.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

0 commit comments

Comments
 (0)