Skip to content

Commit 00a9f52

Browse files
committed
don't build NUnit4 constraints on .NET 5
1 parent 34ce59e commit 00a9f52

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/main/net-constraints-nunit4/XMLUnit.NUnit4.Constraints.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
limitations under the License.
1414
-->
1515

16-
<Project Sdk="Microsoft.NET.Sdk">
16+
<Project>
17+
18+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
1719

1820
<PropertyGroup Label="Build">
1921
<TargetFrameworks>net6.0;net462</TargetFrameworks>
@@ -52,4 +54,7 @@
5254
<PackageReference Include="NUnit" Version="4.3.2" />
5355
</ItemGroup>
5456

57+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
58+
<Import Project="..\..\shared\no-build.targets"
59+
Condition="$([System.Environment]::Version) &lt; 6.0.0.0"/>
5560
</Project>

src/shared/no-build.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<Target Name="Build">
3+
<Message Text="$(MSBuildProjectName) has been skipped." />
4+
</Target>
5+
</Project>

src/tests/net-constraints-nunit4/XMLUnit.NUnit4.Constraints.Test.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
limitations under the License.
1414
-->
1515

16-
<Project Sdk="Microsoft.NET.Sdk">
16+
<Project>
17+
18+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
1719

1820
<PropertyGroup Label="Build">
1921
<TargetFrameworks>net6.0</TargetFrameworks>
@@ -56,4 +58,7 @@
5658
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
5759
</ItemGroup>
5860

61+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
62+
<Import Project="..\..\shared\no-build.targets"
63+
Condition="$([System.Environment]::Version) &lt; 6.0.0.0"/>
5964
</Project>

0 commit comments

Comments
 (0)