![](/img/trans.png)
[英]GetMessage() given an System.ExecutionEngineException
[英]System.ExecutionEngineException in DBContext Constructor
我知道这是一个非常模糊的错误,但我已经在 EF Core 和 CLR git 存储库上发布了信息,但他们不知道。 我想知道这是否与依赖注入有关(我正在使用 AutoFac)。
每隔一次我开始新的调试会话时就会发生错误。 它发生在我从 DbContext 继承的类的构造函数中,当我将 DbContextOptions 传递给基类时。
例外:
异常类型:System.ExecutionEngineException
异常消息="抛出了“System.ExecutionEngineException”类型的异常。"
堆栈跟踪:空
protected WinsDbContextBase(DbContextOptions options, ICurrentUserContext userContext)
: base(options) <=== the error occurs on this line
{
... other code here ...
}
我知道这还不够继续,但我在这里发布这个是希望也许其他人经历过这个并且可以给我一个关于从哪里开始挖掘的线索。
编辑:这归结为 CLR 中的一个已知错误,并计划在 4.8 框架构建中修复。 解决方法是将以下内容添加到我的 Machine.config 文件中:
<configuration>
<runtime>
<disableNativeImageLoad>
<assemblyIdentity name="netstandard" />
</disableNativeImageLoad>
</runtime>
</configuration>
这归结为 CLR 中的一个已知错误,并计划在 4.8 框架构建中修复。 解决方法是将以下内容添加到我的 Machine.config 文件中:
<configuration>
<runtime>
<disableNativeImageLoad>
<assemblyIdentity name="netstandard" />
</disableNativeImageLoad>
</runtime>
</configuration>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.