C# “随机获取”;使用相同的DbCompiledModel创建上下文…”;具有实体框架
在构建解决方案时,当从调试切换到发布时,我会随机出现此错误。我不知道是什么引起的,为什么 我正在使用SQLServer2008和MiniProfilerC# “随机获取”;使用相同的DbCompiledModel创建上下文…”;具有实体框架,c#,entity-framework,mvc-mini-profiler,C#,Entity Framework,Mvc Mini Profiler,在构建解决方案时,当从调试切换到发布时,我会随机出现此错误。我不知道是什么引起的,为什么 我正在使用SQLServer2008和MiniProfiler "Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type o
"Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used."
有人知道为什么吗
有时添加一个新文件,然后重建修复它。是的,以前见过 EF添加一个“散列”,它是由创建实体的工厂和实体组成的签名 使用EF进行分析时,会得到不同的工厂,因此签名会发生变化。一旦禁用它,这种情况再次发生
我能想到的唯一解决办法是始终使用EF的“profiled”工厂并禁用profiled。另外,一定要使用谷歌代码中最新的Mini Profiler,因为这方面已经做了很多工作 谢谢你,现在说得通了。我会等到2.0版在NuGet上发布。