2016-06-30 11 views
2

私は既存のASP.NETプロジェクトを持っていますが、MVCにはありません。私がHangireをインストールしようとすると、このエラーが発生します。既存のプロジェクトにHangfireをインストールできない

PM> Install-Package Hangfire 
Attempting to gather dependency information for package 'Hangfire.1.5.8' with respect to project 'FYMAS', targeting '.NETFramework,Version=v4.0' 
Attempting to resolve dependencies for package 'Hangfire.1.5.8' with DependencyBehavior 'Lowest' 
Resolving actions to install package 'Hangfire.1.5.8' 
Resolved actions to install package 'Hangfire.1.5.8' 
Adding package 'Newtonsoft.Json.5.0.1' to folder 'C:\Users\User\Desktop\hang\packages' 
Added package 'Newtonsoft.Json.5.0.1' to folder 'C:\Users\User\Desktop\hang\packages' 
Added package 'Newtonsoft.Json.5.0.1' to 'packages.config' 
Successfully installed 'Newtonsoft.Json 5.0.1' to FYMAS 
Install failed. Rolling back... 
Package 'Hangfire.Core.1.5.8 : Newtonsoft.Json [5.0.0,), Owin [1.0.0,)' does not exist in project 'FYMAS' 
Removed package 'Newtonsoft.Json.5.0.1' from 'packages.config' 
Package 'Hangfire.Core.1.5.8 : Newtonsoft.Json [5.0.0,), Owin [1.0.0,)' does not exist in folder 'C:\Users\User\Desktop\hang\packages' 
Removing package 'Newtonsoft.Json.5.0.1' from folder 'C:\Users\User\Desktop\hang\packages' 
Removed package 'Newtonsoft.Json.5.0.1' from folder 'C:\Users\User\Desktop\hang\packages' 
Install-Package : Could not install package 'Hangfire.Core 1.5.8'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', 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:1 
+ Install-Package Hangfire 
+ ~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [Install-Package], Exception 
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand 

私はInstall-Package Owinコマンドを使用して、私のプロジェクトにowinインストールしようとした、このインストールは成功ですが、私は再びhanfireをインストールしようとすると、私は同じエラーを得ました。私はInstall-Package HangFire -Version 1.4.6を使用して古いバージョンのhangfireをインストールしようとしましたが、同じエラーが発生しました。

答えて

2

は、(あなたの問題は、その後、あなたはInstall-Package Hangfireを使用する場合、これは

Install-Package Hangfire_net40 

、これは最新の安定版をインストールしますしてみてください、あなたのフレームワークのためのhangfireをインストールする必要があり、あなたが4.0を使用しているあなたの.NETフレームワークであると思われますあなたの場合Hangfire.1.5.8では、これより新しい.net framework〜4.5が必要です)。詳細については、 Hangfire (.Net 4.0) 1.1.1

+0

これはハングファイアをインストールしましたが、この[ブログ](http://frankouimette.com/tutorial-installing-hangfire-without-asp-net-mvc/)に従うことができません –

+0

AccountStatusJobクラスとExecuteメソッドを作成する –

関連する問題