add-migration:由于参数为空字符串,因此无法将其绑定到参数"Path" [英] add-migration : Cannot bind argument to parameter 'Path' because it is an empty string
问题描述
我正在Visual Studio 2017上运行具有Docker支持的默认api核心项目,并且
每当我运行命令add-migration -name name
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:因为参数为空字符串,所以无法将其绑定到参数"Path". 在第1行:char:1 +添加迁移 + ~~~~~~~~~~~~~~ + CategoryInfo:InvalidData:(:) [Add-Migration],ParameterBindingValidationException + FullyQualifiedErrorId:ParameterArgumentValidationErrorEmptyStringNotAllowed,添加迁移
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:此命令在没有Docker支持的情况下有效,但是在添加Docker支持时返回此错误
PS : This command works without docker support, but return this error when I add docker support
推荐答案
您似乎遇到了问题#7540 .现在,将您的项目放在物理"驱动器上,而不是在网络文件共享上.(取消操作.您正在使用PMC命令.)
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.)
您可能遇到的问题是#7439 .运行命令时,请确保将您的应用程序选择为启动项目(或使用-StartupProject
参数).
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.
这篇关于add-migration:由于参数为空字符串,因此无法将其绑定到参数"Path"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!