Hangfire with .net core framework 4.6

您所在的位置:网站首页 反诈表态发言稿 Hangfire with .net core framework 4.6

Hangfire with .net core framework 4.6

2024-01-27 18:39| 来源: 网络整理| 查看: 265

Hello,

I’am using Hangfire with Asp.net framework project 4.6, I get this error ; ‘IServiceCollection’ does not contain a definition for ‘AddHangfire’ and no extension method ‘AddHangfire’ accepting a first argument of type ‘IServiceCollection’ could be found (are you missing a using directive or an assembly reference?)

‘IApplicationBuilder’ does not contain a definition for ‘UseHangfireServer’ and the best extension method overload ‘AppBuilderExtensions.UseHangfireServer(IAppBuilder)’ requires a receiver of type ‘IAppBuilder’ SMCModule.API…NET Framework 4.6 E:\MVC 6\SMCModule Solution\SMCModule\src\SMCModule.API\Startup.cs

Severity Code Description Project File Line Suppression State Error CS1929 ‘IApplicationBuilder’ does not contain a definition for ‘UseHangfireDashboard’ and the best extension method overload ‘AppBuilderExtensions.UseHangfireDashboard(IAppBuilder)’ requires a receiver of type ‘IAppBuilder’ SMCModule.API…NET Framework 4.6

SMCModule.API is the name of my project.

my project.json file is : { “dependencies”: { “Microsoft.ApplicationInsights.AspNetCore”: “1.0.0”, “Microsoft.AspNetCore.Mvc”: “1.0.0”, “Microsoft.AspNetCore.Server.IISIntegration”: “1.0.0”, “Microsoft.AspNetCore.Server.Kestrel”: “1.0.0”, “Microsoft.Extensions.Configuration.EnvironmentVariables”: “1.0.0”, “Microsoft.Extensions.Configuration.FileExtensions”: “1.0.0”, “Microsoft.Extensions.Configuration.Json”: “1.0.0”, “Microsoft.Extensions.Logging”: “1.0.0”, “Microsoft.Extensions.Logging.Console”: “1.0.0”, “Microsoft.Extensions.Logging.Debug”: “1.0.0”, “Microsoft.Extensions.Options.ConfigurationExtensions”: “1.0.0”, “SMCModule.Core”: “1.0.0-*”, “Newtonsoft.Json”: “9.0.1”, “SimpleInjector”: “3.2.0”, “Microsoft.AspNetCore.Owin”: “1.0.0”, “Hangfire”: “1.6.0” },

“tools”: { “Microsoft.AspNetCore.Server.IISIntegration.Tools”: “1.0.0-preview2-final” },

“frameworks”: { “net46”: { } },

“buildOptions”: { “emitEntryPoint”: true, “preserveCompilationContext”: true },

“publishOptions”: { “include”: [ “wwwroot”, “Views”, “Areas/**/Views”, “appsettings.json”, “web.config” ] },

“scripts”: { “postpublish”: [ “dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%” ] } }

Thanks.



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3