代码改过之后,新建解决方案发现EntityFramework版本变的不一致了(以前一直都是6.2.0)
打开对应项目下的packages.config文件,查看,发现<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
手动改过之后,然后Visual Studio中“重新创建解决方案即可”。
注意:如果程序报告如下错误,请参见相关链接
An exception of type ‘System.InvalidOperationException’ occurred in mscorlib.dll but was not handled in user code
Additional information: The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer’ registered in the application config file for the ADO.NET provider with invariant name ‘System.Data.SqlClient’ could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramewor