简体   繁体   English

升级到ASP.NET Core 2.0后MissingMethodException

[英]MissingMethodException after upgrading to ASP.NET Core 2.0

I tried to upgrade to .NET Core 2.0 but after changing the SDK for every project I get the following exception when trying to start the application 我尝试升级到.NET Core 2.0,但是在为每个项目更改SDK之后,尝试启动应用程序时出现以下异常

MissingMethodException: Method not found: 'System.Threading.Tasks.Task Microsoft.AspNetCore.Http.ISession.CommitAsync()'.

I tried to install the nuget package Microsoft.AspNetCore.Http.Features in which the missing method is, but it did not help. 我尝试安装nuget包Microsoft.AspNetCore.Http.Features,其中缺少方法,但是它没有帮助。 When trying to access the method from my C# code the intelli sense is showing it like expected. 当尝试从我的C#代码访问该方法时,智能感觉将其显示为预期的样子。

Ok, I found the answer. 好的,我找到了答案。 We had a nuget package from ourself which had a reference to the old version of Microsoft.AspNetCore.Http.Features. 我们自己有一个nuget包,其中引用了旧版本的Microsoft.AspNetCore.Http.Features。 After upgrading our own nuget package it worked. 升级我们自己的nuget程序包后,它可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM