Method 'ExecuteAsync' in type 'System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy' does not have an implementation

后端 未结 5 1638
野的像风
野的像风 2020-12-06 11:54

I am newer about using Code First in c#. After I enabled Migration in my project and launch my site, I get an Error:

Method \'ExecuteAsync\' in type \'System         


        
5条回答
  •  感动是毒
    2020-12-06 12:37

    I +1'd @Spirit's answer for pointing me at the root of the issue, but I was able to fix it for myself by searching through all of the *.csproj files in the solution and replacing

    packages\EntityFramework.6.1.3\lib\net40\EntityFramework.dll
                                       ^^^^^
    

    with

    packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
                                       ^^^^^
    

    I had a mix of usages in the projects. My symptom was that NCruch would get the exception on a test, but running the same test from NUnit test runner would pass just fine.

提交回复
热议问题