Skip to content

Commit 8d9a36b

Browse files
committed
Build Engine under .NET 6.0 and 8.0
1 parent e662ebf commit 8d9a36b

7 files changed

+14
-3
lines changed

src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
22

3+
#if NETFRAMEWORK
34
using System;
45
using System.Collections.Generic;
56
using System.IO;
@@ -40,3 +41,4 @@ from assemblyName in assemblyNames
4041
}
4142
}
4243
}
44+
#endif

src/NUnitEngine/nunit.engine.tests/Integration/DirectoryWithNeededAssemblies.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
22

3+
#if NETFRAMEWORK
34
using System;
45
using System.IO;
56
using NUnit.Engine.Tests.Helpers;
@@ -31,3 +32,4 @@ public void Dispose()
3132
}
3233
}
3334
}
35+
#endif

src/NUnitEngine/nunit.engine.tests/Integration/MockAssemblyInDirectoryWithFramework.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
22

3+
#if NETFRAMEWORK
34
using System;
45
using System.IO;
56
using NUnit.Framework;
@@ -25,3 +26,4 @@ public void Dispose()
2526
}
2627
}
2728
}
29+
#endif

src/NUnitEngine/nunit.engine.tests/Integration/RunnerInDirectoryWithoutFramework.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
22

3+
#if NETFRAMEWORK
34
using System;
45
using System.IO;
56
using System.Threading;
@@ -39,3 +40,4 @@ public void Dispose()
3940
}
4041
}
4142
}
43+
#endif

src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<RootNamespace>NUnit.Engine.Tests</RootNamespace>
5-
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
5+
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
66
<OutputType>Exe</OutputType>
77
<SignAssembly>true</SignAssembly>
88
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
@@ -23,7 +23,7 @@
2323
<PackageReference Include="NSubstitute" Version="2.0.3" />
2424
</ItemGroup>
2525

26-
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
26+
<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.1'">
2727
<PackageReference Include="NUnit" Version="4.2.2" />
2828
<PackageReference Include="NUnitLite" Version="4.2.2" />
2929
<PackageReference Include="NSubstitute" Version="5.1.0" />

src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public void OnTestEvent(string report)
3333
}
3434
}
3535

36+
#if NET6_0 || NET8_0
37+
[Obsolete]
38+
#endif
3639
public override object InitializeLifetimeService()
3740
{
3841
return null;

src/NUnitEngine/nunit.engine/nunit.engine.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<RootNamespace>NUnit.Engine</RootNamespace>
5-
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
5+
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
66
<SignAssembly>true</SignAssembly>
77
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
88
<DebugType>portable</DebugType>

0 commit comments

Comments
 (0)