简体   繁体   中英

.net core 3.0 Could not load file or assembly 'System.Web.Http Version=5.2.7.0'

I've migrated my WebApi project from .net core 2.2 to .net core 3.0 version. I was following this article: https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio#mvc-service-registration

I was able to build project but I'm getting an exception at runtime:

Unable to load one or more of the requested types. Could not load file or assembly 'System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

Did anyone have same issues? Do you know which nuget package am I missing?

在此处输入图片说明

One of our internal nuget package was not migrated to support .net core 3. That cause runtime exception. We migrated nuget package and problem is fixed. The strange thing is that there was no compile warning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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