diff --git a/src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs b/src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs index 771491452..dd1d3a9a0 100644 --- a/src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs +++ b/src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs @@ -1,5 +1,6 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt +#if NETFRAMEWORK using System; using System.Collections.Generic; using System.IO; @@ -40,3 +41,4 @@ from assemblyName in assemblyNames } } } +#endif \ No newline at end of file diff --git a/src/NUnitEngine/nunit.engine.tests/Integration/DirectoryWithNeededAssemblies.cs b/src/NUnitEngine/nunit.engine.tests/Integration/DirectoryWithNeededAssemblies.cs index 23afea7e2..547e42c3c 100644 --- a/src/NUnitEngine/nunit.engine.tests/Integration/DirectoryWithNeededAssemblies.cs +++ b/src/NUnitEngine/nunit.engine.tests/Integration/DirectoryWithNeededAssemblies.cs @@ -1,5 +1,6 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt +#if NETFRAMEWORK using System; using System.IO; using NUnit.Engine.Tests.Helpers; @@ -31,3 +32,4 @@ public void Dispose() } } } +#endif \ No newline at end of file diff --git a/src/NUnitEngine/nunit.engine.tests/Integration/MockAssemblyInDirectoryWithFramework.cs b/src/NUnitEngine/nunit.engine.tests/Integration/MockAssemblyInDirectoryWithFramework.cs index 1e59a7939..d59b5cde8 100644 --- a/src/NUnitEngine/nunit.engine.tests/Integration/MockAssemblyInDirectoryWithFramework.cs +++ b/src/NUnitEngine/nunit.engine.tests/Integration/MockAssemblyInDirectoryWithFramework.cs @@ -1,5 +1,6 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt +#if NETFRAMEWORK using System; using System.IO; using NUnit.Framework; @@ -25,3 +26,4 @@ public void Dispose() } } } +#endif \ No newline at end of file diff --git a/src/NUnitEngine/nunit.engine.tests/Integration/RunnerInDirectoryWithoutFramework.cs b/src/NUnitEngine/nunit.engine.tests/Integration/RunnerInDirectoryWithoutFramework.cs index b7f5ddf69..088a02a1e 100644 --- a/src/NUnitEngine/nunit.engine.tests/Integration/RunnerInDirectoryWithoutFramework.cs +++ b/src/NUnitEngine/nunit.engine.tests/Integration/RunnerInDirectoryWithoutFramework.cs @@ -1,5 +1,6 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt +#if NETFRAMEWORK using System; using System.IO; using System.Threading; @@ -39,3 +40,4 @@ public void Dispose() } } } +#endif \ No newline at end of file diff --git a/src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj b/src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj index 23ac9be3f..3398bbcd8 100644 --- a/src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj +++ b/src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj @@ -2,7 +2,7 @@ NUnit.Engine.Tests - net462;netcoreapp3.1 + net462;netcoreapp3.1;net6.0;net8.0 Exe true ..\..\nunit.snk @@ -23,7 +23,7 @@ - + diff --git a/src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs b/src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs index 316d98381..ce623a191 100644 --- a/src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs +++ b/src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs @@ -33,6 +33,9 @@ public void OnTestEvent(string report) } } +#if NET6_0 || NET8_0 + [Obsolete] +#endif public override object InitializeLifetimeService() { return null; diff --git a/src/NUnitEngine/nunit.engine/nunit.engine.csproj b/src/NUnitEngine/nunit.engine/nunit.engine.csproj index ab802c56e..040bd46fe 100644 --- a/src/NUnitEngine/nunit.engine/nunit.engine.csproj +++ b/src/NUnitEngine/nunit.engine/nunit.engine.csproj @@ -2,7 +2,7 @@ NUnit.Engine - net462;netstandard2.0 + net462;netstandard2.0;net6.0;net8.0 true ..\..\nunit.snk portable