gpt4 book ai didi

asp.net-core - 失败 : Microsoft. AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]

转载 作者:行者123 更新时间:2023-12-01 22:18:12 27 4
gpt4 key购买 nike

当我的 .NET Core 应用程序运行时,我注意到以下行:

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. System.TypeLoadException: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.

我只是好奇是什么导致了此错误,因为尽管出现错误消息,我的应用程序仍然运行良好。

顺便说一下,我使用的是 .NET Core 2.0.0 Preview 1 版本。

最佳答案

Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware 只是当程序中没有其他内容时捕获异常的中间件

所以你的“真正”异常(exception)是程序集“Microsoft.EntityFrameworkCore.SqlServer,...”中类型“Microsoft.EntityFrameworkCore.Infrastruct.Internal.SqlServerOptionsExtension”中的方法“Clone”没有实现

通过对此异常进行一些谷歌搜索,似乎可以归结为您的 .Net Core 版本与 EF 提供程序的支持

如果您想了解更多信息,您可以:

关于asp.net-core - 失败 : Microsoft. AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44880520/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com