C
C#2y ago
morry329#

✅ The specified deps.json does not exist while scaffolding DB

I am going through a tutorial to create a Web API app with ASP.NET6 and MySql. I wanted to scaffold my Sql Database. I entered a following command into Package Manager Console on Visual Studio 2022
Scaffold-DbContext "server=localhost;port=3306;user=root;password=MyPASS!;database=databasename" MySql.EntityFrameworkCore -OutputDir Entities -f
Scaffold-DbContext "server=localhost;port=3306;user=root;password=MyPASS!;database=databasename" MySql.EntityFrameworkCore -OutputDir Entities -f
` And it only give me this error:
The specified deps.json [\\\\vmware-host\Shared Folders\Desktop\C#_co\RESTAPI_demo1\RESTAPI_demo1\bin\Debug\net6.0\RESTAPI_demo1.deps.json] does not exist
The specified deps.json [\\\\vmware-host\Shared Folders\Desktop\C#_co\RESTAPI_demo1\RESTAPI_demo1\bin\Debug\net6.0\RESTAPI_demo1.deps.json] does not exist
When I look at my bin *there is * such file sitting there. Why does this annoying error pop up? (And how did you all resolve this error?)
7 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
morry329#
morry329#OP2y ago
Thank you so much! I will try this tomorrow 🙂
bookuha
bookuha2y ago
Not related to the question, but please check DB twice before scaffolding or you may get strange output
morry329#
morry329#OP2y ago
Ok will do. The DB is supposed to be configured properly right? Like the table is supposed to be computed already etc Is there another positional parameter to reference "C:\path\to\deps.json"? With -DepsPath it gave me this error
Scaffold-DbContext : A parameter cannot be found that matches parameter name 'DepsPath'.
At line:1 char:146
+ ... 1" MySql.EntityFrameworkCore -OutputDir Entities -f -DepsPath "\\vmwa ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Scaffold-DbContext], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Scaffold-DbContext
Scaffold-DbContext : A parameter cannot be found that matches parameter name 'DepsPath'.
At line:1 char:146
+ ... 1" MySql.EntityFrameworkCore -OutputDir Entities -f -DepsPath "\\vmwa ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Scaffold-DbContext], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Scaffold-DbContext
`
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
morry329#
morry329#OP2y ago
Sorry for not being able to come back --- and thank you so much for this. My IDE kept giving me
A parameter cannot be found that matches parameter name
A parameter cannot be found that matches parameter name
thing after we discussed this last week. I switched my IDE from VS 2022 to Rider and I have tried to scaffold a fully computed database (with stored procedures and a lot of computed data in it). It worked finally, so I think my problem lied in the database (SQL), not the C# side
Want results from more Discord servers?
Add your server