Skip to content

Commit

Permalink
Build Engine under .NET 6.0 and 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Oct 3, 2024
1 parent e662ebf commit 8d9a36b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/NUnitEngine/nunit.engine.tests/Helpers/ShadowCopyUtils.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -40,3 +41,4 @@ from assemblyName in assemblyNames
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -31,3 +32,4 @@ public void Dispose()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -25,3 +26,4 @@ public void Dispose()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -39,3 +40,4 @@ public void Dispose()
}
}
}
#endif
4 changes: 2 additions & 2 deletions src/NUnitEngine/nunit.engine.tests/nunit.engine.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamespace>NUnit.Engine.Tests</RootNamespace>
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
Expand All @@ -23,7 +23,7 @@
<PackageReference Include="NSubstitute" Version="2.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.1'">
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnitLite" Version="4.2.2" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
Expand Down
3 changes: 3 additions & 0 deletions src/NUnitEngine/nunit.engine/Runners/TestEventDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public void OnTestEvent(string report)
}
}

#if NET6_0 || NET8_0
[Obsolete]
#endif
public override object InitializeLifetimeService()
{
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/NUnitEngine/nunit.engine/nunit.engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamespace>NUnit.Engine</RootNamespace>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
<DebugType>portable</DebugType>
Expand Down

0 comments on commit 8d9a36b

Please sign in to comment.