在将项目更新为.NET CORE 3.1时,错误无法加载类型' Microsoft.aspnetcore.mvc.mvcjsonoptions'
在将项目升级到.net core 3.1时,我面临错误“'无法加载'Microsoft.aspnetcore.mvc.mvcjsonoptions'汇编'Microsoft.aspnetcore.mvc.formatters.json,版本= 3.1.25.0“
尝试= 3.1.25.0”步骤,解决:
- swashbuckle.aspnetcore升级到5.0.0(仍然无法正常工作)。
- 删除了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:
- Upgraded Swashbuckle.AspNetCore to 5.0.0 (Still not working).
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论