add-migration : Cannot bind argument to parameter 'Path' because it is null

蓝咒 提交于 2019-12-25 01:24:34

问题


I want to enable migration in visual studio 2017. When I run it, I'm getting an error. The error message is:

add-migration : Cannot bind argument to parameter 'Path' because it is null. At line:1 char:1 + add-migration ApplyAnnotationsToCustomerName + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Add-Migration], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Add-Migration.

I tried to uninstalling and reinstall EntityFramework and it didn't work.

Also my startup project is set to the project with EF. nothing worked!!


回答1:


Ohh... spent hours trying to figure this one out. I tried all the suggestions I could find and even tried what you did uninstalling and reinstalling EF. Nothing seemed to work and it was really frustrating. In the end what ultimately worked for me was how I uninstalled and reinstalled EF!

Uninstall:

PM> Uninstall-Package EntityFramework -Force

Reinstall EntityFramework:

PM> Install-Package EntityFramework -Pre

Source: https://entityframework.net/knowledge-base/14410987/entity-framework-code-first-migration-error



来源:https://stackoverflow.com/questions/58357679/add-migration-cannot-bind-argument-to-parameter-path-because-it-is-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!