add-migration : Cannot bind argument to parameter 'Path' because it is an empty string

asp.net-core-webapi docker entity-framework-core visual-studio-2017

Question

I'm running default api core project on Visual studio 2017 with docker support and I got this error everytime I run the command add-migration -name name

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

PS : This command works without docker support, but return this error when I add docker support

1
8
3/8/2017 11:05:47 AM

Accepted Answer

It looks like you're hitting issue #7540. For now, put your project on a "physical" drive instead of a network file share. (Scratch that. You're using the PMC commands.)

You're probably hitting issue #7439. Make sure your app is selected as the startup project (or use the -StartupProject parameter) when running the commands.

21
1/5/2018 10:01:04 AM

Popular Answer

It would be interesting to know with which version of Entity Framework this error occurred. I had the same error with EF 6.3.0 and I am not using docker at all.

The solution for me was to go back to version 6.2.0 and create the migration with it.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow