Reputation: 147
I am trying to install Quartz.net in an application and getting following error
PM> Install-Package Quartz -Version 3.0.2
Installing 'Quartz 3.0.2'.
Successfully installed 'Quartz 3.0.2'.
Adding 'Quartz 3.0.2' to Service.
Uninstalling 'Quartz 3.0.2'.
Successfully uninstalled 'Quartz 3.0.2'.
Install failed. Rolling back...
Install-Package : Could not install package 'Quartz 3.0.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. At line:1 char:16 + Install-Package <<<< Quartz -Version 3.0.2 + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Upvotes: 0
Views: 4226
Reputation: 81503
The error message is actually telling you whats going on
You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework
If you go to the nuget page you will see the dependencies
.NETFramework 4.5.2
or
.NETStandard 2.0
Microsoft.CSharp (>= 4.4.0)
System.Collections.NonGeneric (>= 4.3.0)
System.Collections.Specialized (>= 4.3.0)
System.ComponentModel.TypeConverter (>= 4.3.0)
System.Configuration.ConfigurationManager (>= 4.4.0)
System.Data.Common (>= 4.3.0)
System.Data.SqlClient (>= 4.4.0)
System.Net.NameResolution (>= 4.3.0)
System.Reflection.TypeExtensions (>= 4.4.0)
System.Runtime.Serialization.Xml (>= 4.3.0)
System.Threading.Thread (>= 4.3.0)
System.Xml.XmlSerializer (>= 4.3.0)
You need to upgrade your frame work to at least 4.5.2
Upvotes: 0
Reputation: 711
As the error states, you're trying to install Quartz to a .net 4.5 project but it isn't compatible with that framework. The dependencies list for Quartz 3.0.2 on NuGet state it requires .net 4.5.2 or .net standard 2.0
You could try using an older version (before 3.0.0 as this seems to be when it was updated for .net 4.5.2/netstandard2.0) eg Install-Package Quartz -Version 2.6.1
or updating the framework for your project to be .net 4.5.2 or higher. In visual studio you can update your target framework by right clicking the project, selecting properties
, and changing the Target Framework:
dropdown.
Upvotes: 0
Reputation: 1839
The Quartz 3.0.2 change log states that after updating the minimum requirements to .NET 4.6 it was brought down again to .NET 4.5.2, so you might as well try changing your project target to it.
Upvotes: 0
Reputation: 560
The latest version of Quartz.NET requires .NET 4.5.2. Your project uses .NET 4.5.1.
Quartz.NET 2.6.1 is the most recent version that I'm seeing that might for you. It doesn't like a .NET version requirement. Hopefully that means that it works with 4.5.1.
https://www.nuget.org/packages/Quartz/2.6.1
Upvotes: 3