The specified deps.json [path\App.Web.Site\App.Web.deps.json] does not exist

.net .net-core entity-framework-core visual-studio-2017 visual-studio-2019

Question

I try to run entity framework (Microsoft.EntityFrameworkCore 2.24) migration on my .net core web application and I am getting this:

PM> add-migration "initial"
The specified deps.json [path\App.Web.Site\App.Web.deps.json] does not exist

What is the problem here?

P.S. App.Web.deps.json can be found in path\App.Web.Site\bin\Debug\netcoreapp2.2 instead

1
1
6/9/2019 5:39:25 PM

Popular Answer

I have the same problem after I updated Visual Studio to 16.1.3. Create new project, run it, stop debug, then I read the following in Package Manager Console:

PM> add-migration -v initial
Using project 'TestEf2'.
Using startup project 'TestEf2'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile G:\testef\TestEf2\TestEf2.deps.json --additionalprobingpath C:\Users\snytko\.nuget\packages --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools\2.2.0\tools\netcoreapp2.0\any\ef.dll" migrations add initial --json --verbose --no-color --prefix-output --assembly G:\testef\TestEf2\TestEf2.dll --startup-assembly G:\testef\TestEf2\TestEf2.dll --project-dir G:\testef\TestEf2\ --language C# --working-dir G:\testef\TestEf2 --root-namespace TestEf2
The specified deps.json [G:\testef\TestEf2\TestEf2.deps.json] does not exist
PM> 

I filed this to microsoft using their feedback system. Hope it works. Generated file is at another path:

G:\testef\TestEf2\bin\Debug\netcoreapp2.2\TestEf2.deps.json

One can just copy all contents of the bin directory to the path where EF searches the deps file everytime it's needed to work with migrations..

0
6/17/2019 10:55:54 AM


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