EF 4.1 exception “The provider did not return a ProviderManifestToken string”

后端 未结 15 1124
闹比i
闹比i 2020-11-30 05:02

I am trying to replicate an example found on MSDN. I am using ASP.NET and EF 4.1 (CTP?). I\'ve used NuGet to install the EntityFramework package.

I am getting this e

15条回答
  •  情话喂你
    2020-11-30 05:55

    I had a error for entity framework, but none of the above answers ended up fitting into the solution that finally worked.

    My EntityFramework Code First Models and DataContext were in a Separate project from my WebAPI Main Project. My Entity Framework Project somewhere down the line of coding was set as the startup project and therefore when I was running a migration I was getting “The provider did not return a ProviderManifestToken string” ... connection issue.

    Turns out that since the ConnectionString to the DB is located in the Web.config file in WebAPI Main project, that when I was running a migration the connection string was not being retrieved. By setting WebAPI project as my startProject I was able to successfully connect.

提交回复
热议问题