在将项目更新为.NET CORE 3.1时,错误无法加载类型' Microsoft.aspnetcore.mvc.mvcjsonoptions'

发布于 2025-02-13 05:02:07 字数 402 浏览 0 评论 0原文

在将项目升级到.net core 3.1时,我面临错误“'无法加载'Microsoft.aspnetcore.mvc.mvcjsonoptions'汇编'Microsoft.aspnetcore.mvc.formatters.json,版本= 3.1.25.0“

尝试= 3.1.25.0”步骤,解决:

  1. swashbuckle.aspnetcore升级到5.0.0(仍然无法正常工作)。
  2. 删除了dll microsoft.aspnetcore.mvc.formatters.json,如前所述,对此DLL的支持在Core 3.1中删除(仍然无法正常工作)。

基本上,我在CreateHostBuilder(args).build()。run() - >中;因此,在build()中,它会丢弃错误。

While upgrading project to .NET CORE 3.1, I am facing error "'Could not load type 'Microsoft.AspNetCore.Mvc.MvcJsonOptions' from assembly 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=3.1.25.0"

Steps tried to resolve:

  1. Upgraded Swashbuckle.AspNetCore to 5.0.0 (Still not working).
  2. Removed DLL Microsoft.AspNetCore.Mvc.Formatters.Json as mentioned that support for this DLL is removed in CORE 3.1 (Still not working).

Basically I am getting issue in CreateHostBuilder(args).Build().Run() --> So here in Build() it's throwing an error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文