admin管理员组文章数量:1122846
Visual Studio 2022 (17.11.6) .Net 8.0
I have a project where I currently need to update my model after I added a field to the DB. I run the following scaffolding command using the Package Manager Console:
Scaffold-DbContext 'Name=ConnectionStrings:'Entities' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Force -Context EntityContext
It successfully builds the project, but then throws the following error:
The specified deps.json [\\SomeServer\ThisProject\bin\Debug\net8.0\ThisProject.deps.json] does not exist
However, if I copy that exact folder path (except the leading two escape slashes) and paste it into Windows Explorer, it brings me to that folder and the file "ThisProject.deps.json" is in there.
I have tried deleting the "obj" and "bin" and ".vs" folders. No change. I have tried deleting the "ThisProject.deps.json" file itself. It just gets recreated every time I build the project. I have tried updated Visual Studio. No change. I have tried updated all my Entity Framework packages. No change. I have tried setting this as the default project (there is only one project in this solution so I don't see how that would matter anyway). No change.
I will note that where I work requires me to run this project as admin.
Visual Studio 2022 (17.11.6) .Net 8.0
I have a project where I currently need to update my model after I added a field to the DB. I run the following scaffolding command using the Package Manager Console:
Scaffold-DbContext 'Name=ConnectionStrings:'Entities' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Force -Context EntityContext
It successfully builds the project, but then throws the following error:
The specified deps.json [\\SomeServer\ThisProject\bin\Debug\net8.0\ThisProject.deps.json] does not exist
However, if I copy that exact folder path (except the leading two escape slashes) and paste it into Windows Explorer, it brings me to that folder and the file "ThisProject.deps.json" is in there.
I have tried deleting the "obj" and "bin" and ".vs" folders. No change. I have tried deleting the "ThisProject.deps.json" file itself. It just gets recreated every time I build the project. I have tried updated Visual Studio. No change. I have tried updated all my Entity Framework packages. No change. I have tried setting this as the default project (there is only one project in this solution so I don't see how that would matter anyway). No change.
I will note that where I work requires me to run this project as admin.
Share Improve this question edited Nov 22, 2024 at 4:21 Jason Pan 21.5k2 gold badges19 silver badges39 bronze badges asked Nov 21, 2024 at 22:31 Ross EkbergRoss Ekberg 32 bronze badges 3 |1 Answer
Reset to default 0Use Scaffold-dbcontext
and Add-Migration
command, it will show the error message The specified deps.json [\\SomeServer\ThisProject\bin\Debug\net8.0\ThisProject.deps.json] does not exist
if we are executing from a network drive that begins with two slashes. i.e. "\SomeServer...".
And it is working perfectly on local drive.
Related Links
The specified deps.json [\\TeamDrive\IT\Team Software\Project\etc...] does not exist#14349
deps.json not found due to extra backslashes being added to search path for a network drive beginning with '\' #21048
本文标签: net 80The Specified depsjson Does Not Exist Even Though It DoesStack Overflow
版权声明:本文标题:.net 8.0 - The Specified deps.json Does Not Exist... Even Though It Does - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306797a1933089.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
\\SomeServer
, it should be a problem caused by the network path. Could you create a sample and verify it in local, thanks. – Jason Pan Commented Nov 22, 2024 at 4:51