Donate

Add-Migration : Cannot bind argument to parameter 'Path' because it is null - Entity Framework Core Error

Good morning!

Recently, I've been reading some tutorials on .NET Core specifically Entity Framework Core and doing some basic coding of the Code First Paradigm using a Console Application. However, running the first command Add-Migration "Migration Name" to enable migrations for the application produced an error "Unable to resolve startup project ''. Using project 'ConsoleDemoEF' as the startup project. Add-Migration : Cannot bind argument to parameter 'Path' because it is null". The full details of the issue is provided below.
PM> Add-Migration InitialTestMigration
Unable to resolve startup project ''.
Using project 'ConsoleDemoEF' as the startup project.
Add-Migration : Cannot bind argument to parameter 'Path' because it is null.
At line:1 char:1
+ Add-Migration InitialTestMigration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Migration], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Add-Migration
I've spent a couple of hours looking for answers but to no avail most of the presented solutions did not solve the issue. The Console App's specifications are as follows: Target Framework - .NET Core 2.1, Microsoft.EntityFrameworkCore.SqlServer 2.1.0 and Microsoft.EntityFrameworkCore.Tools 2.1.0. I did try all of the 2.x versions with matching EF Core packages.
Add-Migration : Cannot bind argument to parameter 'Path' because it is null Entity Framework Core
After several attempts, I made the Add-Migrations commmand work by creating another Console application that targets the .NET Core 3.1 Framework and selected the latest version of Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Tools NuGet packages from 2.x to 5.0.4. After that, I can now proceed running the other commands of Entity Framework Core Code First approach such as Update-Database.
Add-Migration : Cannot bind argument to parameter 'Path' because it is null Entity Framework Core

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.