启用 - 迁移失败 [英] Enable-Migration fails
问题描述
hi,
启用 - 迁移命令失败,错误消息:
Enable-Migration commande fails, error message :
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
'file:******\EntityFramework.6.1.3\tools\EntityFramework.PowerShell.Utility.dll' or one of its
dependencies. The system cannot find the file specified."
At C:*******\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException
i拥有实体框架包的最新更新。
i have the latest update of the entity framework package.
推荐答案
您好EL ATLAS Nabil,
Hi EL ATLAS Nabil,
根据您的描述,我猜这个错误是关于Entity Framework加载文件失败。
According to your description, I guess this error is about Entity Framework load file fail.
所以,我建议您可以尝试卸载实体框架,然后使用
So, I suggest maybe you can try to Uninstall the Entity Framework then install it with
软件包管理控制台进行安装。
Package Manage Console.
如何操作:
要进入软件包管理器控制台,请转到:工具 - >库软件包管理器 - >软件包管理器控制器。
To get to the Package Manager Console go to: Tools -> Library Package Manager -> Package Manager Consoler .
Uninstall-Package EntityFramework -Forc e
Uninstall-Package EntityFramework -Force
然后为您的项目安装它:
Then install it for your project:
Install-Package EntityFramework
Install-Package EntityFramework
最好的问候,
Grady
这篇关于启用 - 迁移失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!