Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop full framework support, NET 6.0 new minimum #2226

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,11 @@ protected override void OnBuildInitialized()
.After(Compile)
.Executes(() =>
{
var framework = "";
if (!IsRunningOnWindows)
{
framework = "net8.0";
}

var testProjects = new[] { "Quartz.Tests.Unit", "Quartz.Tests.AspNetCore" };
DotNetTest(s => s
.EnableNoRestore()
.EnableNoBuild()
.SetConfiguration(Configuration)
.SetFramework(framework)
.SetLoggers(GitHubActions.Instance is not null ? new[] { "GitHubActions" } : Array.Empty<string>())
.CombineWith(testProjects, (_, testProject) => _
.SetProjectFile(Solution.GetAllProjects(testProject).First())
Expand Down Expand Up @@ -207,7 +200,6 @@ void RunPsqlAsQuartznetUser(string parameters)
.EnableNoRestore()
.EnableNoBuild()
.SetConfiguration(Configuration)
.SetFramework("net6.0")
.SetLoggers("GitHubActions")
.SetFilter("TestCategory!=db-firebird&TestCategory!=db-oracle&TestCategory!=db-mysql&TestCategory!=db-sqlserver")
.CombineWith(integrationTestProjects, (_, testProject) => _
Expand Down
8 changes: 0 additions & 8 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
<DefineConstants>$(DefineConstants);REMOTING</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants);DIAGNOSTICS_SOURCE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Include="..\quartz-logo-small.png" Pack="true" Visible="false" PackagePath=""/>
</ItemGroup>
Expand Down
22 changes: 7 additions & 15 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net472' ">
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="2.1.1" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.7" />
<PackageVersion Include="AspNetCore.HealthChecks.UI" Version="8.0.0" />
Expand All @@ -25,14 +15,17 @@
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.18" />
<PackageVersion Include="Microsoft.Data.SQLite" Version="8.0.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="MySqlConnector" Version="2.3.1" />
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.0-preview010" />
Expand All @@ -46,7 +39,6 @@
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Quartz" Version="1.0.0-alpha.3" />
<PackageVersion Include="OpenTracing" Version="0.12.1" />
<PackageVersion Include="Oracle.ManagedDataAccess" Version="21.12.0" />
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.120" />
<PackageVersion Include="Serilog" Version="3.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.AspNetCore/Quartz.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Quartz.NET ASP.NET Core integration; $(Description)</Description>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Authors>Lewis Zou, Marko Lahma, Quartz.NET</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.Benchmark/Quartz.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net48</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<!-- Necessary to run benchmarks on .NET 6.0+ -->
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.Examples/Quartz.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);MA0004</NoWarn>
Expand Down
4 changes: 1 addition & 3 deletions src/Quartz.HttpClient/Quartz.HttpClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

<PropertyGroup>
<AssemblyTitle>Quartz.NET HTTP client</AssemblyTitle>
<TargetFrameworks>netstandard2.0;net8.0;</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" />
<PackageReference Include="System.Net.Http.Json" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
<PackageReference Include="System.Reflection.Emit" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.Jobs/Quartz.Jobs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Quartz.NET Jobs; $(Description)</Description>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>quartz-jobs.md</PackageReadmeFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<Title>Quartz.NET TimeZoneConverter integration</Title>
<Description>Quartz.NET TimeZoneConverter integration https://github.com/mj1856/TimeZoneConverter; $(Description)</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.Plugins/Quartz.Plugins.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Quartz.NET Plugins; $(Description)</Description>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>quartz-plugins.md</PackageReadmeFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<Title>Quartz.NET JSON Serialization</Title>
<Description>Quartz.NET JSON Serialization Support; $(Description)</Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Quartz</RootNamespace>
<Title>Quartz.NET System.Text.Json Serialization</Title>
<Description>Quartz.NET System.Text.Json Serialization Support; $(Description)</Description>
Expand Down
6 changes: 1 addition & 5 deletions src/Quartz.Server/Quartz.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -13,10 +13,6 @@
<Content Include="log4net.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Configuration" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Quartz\Quartz.csproj" />
<ProjectReference Include="..\Quartz.Serialization.Newtonsoft\Quartz.Serialization.Newtonsoft.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,6 @@ public void TestDbMetadataMySql()
TestDbMetadata("MySqlConnector");
}

#if NETFRAMEWORK

[Test]
[Category("db-oracle")]
public void TestDbMetadataOracleODP()
{
TestDbMetadata("OracleODP");
}

[Test]
[Category("db-oracle")]
public void TestDbMetadataOracleODPManaged()
{
var provider = TestDbMetadata("OracleODPManaged");
var command = (Oracle.ManagedDataAccess.Client.OracleCommand) provider.CreateCommand();
Assert.That(command.BindByName, Is.True, "bind by name should default to true");
}
#endif

private static DbProvider TestDbMetadata(string dbname, bool hashCustomBinaryType = true)
{
DbProvider dbp = new DbProvider(dbname, "foo");
Expand Down
12 changes: 2 additions & 10 deletions src/Quartz.Tests.Integration/Quartz.Tests.Integration.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
<NoWarn>SYSLIB0011;CAC001</NoWarn>
Expand All @@ -25,6 +25,7 @@
<PackageReference Include="MySqlConnector" />
<PackageReference Include="NUnit" />
<PackageReference Include="Npgsql" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" />
<PackageReference Include="System.Data.SQLite.Core" />
<PackageReference Include="NUnit3TestAdapter" />
</ItemGroup>
Expand All @@ -35,15 +36,6 @@
<ProjectReference Include="..\Quartz.Serialization.Newtonsoft\Quartz.Serialization.Newtonsoft.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Oracle.ManagedDataAccess.Core" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="Oracle.ManagedDataAccess" />
</ItemGroup>

<ItemGroup>
<GlobalPackageReference Remove="Meziantou.Analyzer" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#if NETFRAMEWORK
using System.Net.Http;
#endif

using FakeItEasy;

using FluentAssertions;
Expand Down
8 changes: 0 additions & 8 deletions src/Quartz.Tests.Unit/Impl/AdoJobStore/StdAdoDelegateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,6 @@ protected override void SetParameter(string parameterName, DbParameter value)

public override object SyncRoot => throw new NotImplementedException();

#if NETFRAMEWORK
public override bool IsFixedSize => throw new NotImplementedException();

public override bool IsReadOnly => throw new NotImplementedException();

public override bool IsSynchronized => throw new NotImplementedException();
#endif

public override int IndexOf(string parameterName)
{
throw new NotImplementedException();
Expand Down
18 changes: 0 additions & 18 deletions src/Quartz.Tests.Unit/JobDetailTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
using Quartz.Simpl;
using Quartz.Util;

#if REMOTING
using Quartz.Tests.Unit.Utils;
#endif

namespace Quartz.Tests.Unit;

/// <author>Marko Lahma (.NET)</author>
Expand Down Expand Up @@ -59,20 +55,6 @@ public void TestClone()
Assert.AreEqual(jobDetail, clonedJobDetail);
}

#if REMOTING
[Test]
public void JobDetailsShouldBeSerializable()
{
JobDetailImpl original = new JobDetailImpl("name", "group", typeof (NoOpJob));

JobDetailImpl cloned = original.DeepClone();

Assert.That(cloned.Name, Is.EqualTo(original.Name));
Assert.That(cloned.Group, Is.EqualTo(original.Group));
Assert.That(cloned.Key, Is.EqualTo(original.Key));
}
#endif

[Test]
public void SettingKeyShouldAlsoSetNameAndGroup()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Quartz.Tests.Unit/Quartz.Tests.Unit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
<NoWarn>SYSLIB0011;CS0618</NoWarn>
Expand Down
4 changes: 0 additions & 4 deletions src/Quartz.Tests.Unit/QuartzHostedServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
using Quartz.Impl.Matchers;
using Quartz.Spi;

#if NET6_OR_GREATER
using Lifetime = Microsoft.Extensions.Hosting.IHostApplicationLifetime;
#else
using Lifetime = Microsoft.Extensions.Hosting.IApplicationLifetime;
#endif

namespace Quartz.Tests.Unit;

Expand Down