Reputation: 88
I have a small ASP.NET web application, but for some reason I have an issue with migrations after type in Package Manager console:
PM> Enable-Migrations
Console throws this error
Enable-Migrations : Cannot bind argument to parameter 'Path' because it is null.
At line:1 char:1
+ Enable-Migrations
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Enable-Migrations], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Enable-Migrations
I use Visual Studio 2019 and have installed Entity Framework 6.3.0 via NugGet Package Manager. Also have a DbContext
class in my models
folder
I've tried a lot of solutions that I saw other people have made, but none of them works. Hope someone has similar problem.
P.S Project structure is
Project
- Connected Services
- Properties
- References
- App_Data
- App_Start
- Content
- Controllers
- fonts
- Models
- Scripts
- Views
- favicon.iso
- Global.asax
- packages.config
- Web.config
Upvotes: 1
Views: 4415
Reputation: 1
Olá, Eu tive esse mesmo problema em um projeto pessoal, e após algumas horas de teste consegui resolver da seguinte forma: 1 - Acesse Ferramentas > Gerenciador de pacotes do NuGet > Gerenciador de pacotes do NuGet para solução.
2 - Desinstale o EntityFramework 6.3.0 "que foi o meu caso", e instale a versão 6.2.0, feito isso, Recompilar Solução, em seguida rode o comando > Enable-Migrations
Upvotes: -1