.net core Rotativa.NetCore无法加载类型';Microsoft.AspNetCore.Builder.CookieAuthenticationOptions';

.net core Rotativa.NetCore无法加载类型';Microsoft.AspNetCore.Builder.CookieAuthenticationOptions';,.net-core,rotativa,.net Core,Rotativa,我在.Net CORE 2.0(最新版本等)上使用Rotativa.NetCore,出现以下错误: 处理请求时发生未处理的异常。 TypeLoadException:无法从程序集“Microsoft.AspNetCore.Authentication.Cookies,版本=2.0.1.0,区域性=中性,PublicKeyToken=adb9793829ddae60”加载类型“Microsoft.AspNetCore.Builder.CookieAuthenticationOptions” 有什么

我在.Net CORE 2.0(最新版本等)上使用Rotativa.NetCore,出现以下错误: 处理请求时发生未处理的异常。 TypeLoadException:无法从程序集“Microsoft.AspNetCore.Authentication.Cookies,版本=2.0.1.0,区域性=中性,PublicKeyToken=adb9793829ddae60”加载类型“Microsoft.AspNetCore.Builder.CookieAuthenticationOptions”


有什么建议吗?

这里有将Rotativa.NetCore从.Net Core 1更新到.Net Core 2.0的代码:

您的csproj中是否列出了Microsoft.AspNetCore.All元包()?如果是这样,您使用的是哪个版本?2.0.3-它被列为NUGET依赖项@David您能再解释一下.Net Core 2.0的必要更改吗。@AnastasiosSelmanis Rotativa.NetCore是为.Net Core 1编写的。它使用的CookieAuthenticationOptions类不再存在于.Net Core 2中。因此,要使Rotativa.NetCore在.NETCore2上工作,请不要使用NuGet包。相反,从github.com/aaxelm/Rotativa.NetCore下载源代码,对此处概述的代码进行更改:github.com/aaxelm/Rotativa.NetCore/pull/1/files?diff=split,然后在Visual Studio中,右键单击您的解决方案并将此项目作为现有项目添加到您正在处理的任何项目中。希望有帮助!