I get an error when I to run add-migration with entitcore on any dotnetcore based project but the equivalent command works when targeting the full dotnetframework
Add-Migration : Exception calling "AddFromFile" with "1" argument(s): "'basePath' cannot be an empty string ("")
see a snapshot of my code. It's a dotnetcore console app. Thesame will work if created the project based on dotnetframewok 4.6.1
Add-Migration -Name "TestMigration" -Project BTrips.Domain
Just specify -Name
param
I ran into the same issue. I copied the project to another path (C:\Projects) and when I tried to add the migration I got this weird error:
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot find path '\HOME\Admin\Documents\Visual Studio 2017\Projects\WebApiEFCore\WebApiEFCore\obj\project.assets.json' because it does not exist.
Then I closed the solution, I opened again and I was able to add the migration.
I recreated the error creating another project in the same path I was using at the beginning, so it must be something related with the path.
Hope this could help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With