efcore: The specified deps.json [..] does not exist after VS 2019 update
Create new .net core MVC project, run it, stop debug, then write in Package Manager Console the string to add migration:
PM> add-migration initial
The specified deps.json [G:\testef\TestEf2\TestEf2.deps.json] does not exist
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>
It was working before update of VS 2019. Now I have 16.1.3. Generated files are inside in G:\testef\TestEf2\bin\Debug\netcoreapp2.2 folder.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/610087/the-specified-depsjson-does-not-exist-after-vs-201.html VSTS ticketId: 923080 These are the original issue comments:
Visual Studio Feedback System on 6/18/2019, 02:59 AM (13 days ago): We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Visual Studio Feedback System on 6/18/2019, 11:06 PM (12 days ago): Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq . In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/ . We’ll keep you posted on any updates to this feedback.
These are the original issue solutions:
xekegedud solved on 6/21/2019, 10:09 AM (10 days ago), 0 votes:
I have tried this at home (this is OP posting) on my home machine and it works on 16.1.2 and after I updated to 16,1,3 it works too. So I just need to fix this error on my work machine; the only problem I dont know how.
xekegedud solved on 6/27/2019, 00:39 AM (4 days ago), 0 votes:
updated to 16.1.4, still the same output:
PM> add-migration test -v
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 test --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>
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 115 (24 by maintainers)
Commits related to this issue
- PMC Tools: Throw a better exception when ActiveConfiguration returns null Part of #16386 — committed to bricelam/efcore by bricelam 4 years ago
- PMC Tools: Throw a better exception when ActiveConfiguration returns null Part of #16386 — committed to bricelam/efcore by bricelam 4 years ago
- PMC Tools: Throw a better exception when ActiveConfiguration returns null (#22334) Part of #16386 — committed to dotnet/efcore by bricelam 4 years ago
Finally figured-out issue and fixed it.
It’s ‘Azure development’ component which is causing this error (desp.json) , Un-installing that component is fixed this issue. Now, I can execute every EF core command successfully from package manager console. Hope! it will be fixed in future update.
I am using Visual studio 2019 community edition - 16.1.5
For everyone with the problem posted here I would encourage you to see my link here and try the test presented. https://developercommunity.visualstudio.com/content/problem/1061310/project-configuration-manager-properties-is-blank-1.html. Even though this heavily effects some of us with EF there is more to it. I would like to confirm my strong belief that the problem presented here is caused by VS itself and the EF issue is just one of many results of the underlying VS problem. Please try the test and if you are affected please upvote the issue presented. BTW if you have this issue the only work around is to use the EF Command Line Interface (CLI).
As of today, you can use dotnet CLI to create migration… It is working as I checked it just today with VS2019.
dotnet ef migrations add InitialCreate
### Error solution The error appears when programming in Microsoft.AspNetCore.MVC with NET 5.0, when trying to create a Migration and a DataBase. By typing in the package manager console:
PM> Add-Migration InitialCreate (or Update-Database) Build started. Build succeeded. **The specified deps.json [C: \ VSProjects \ RazorPagesMovie \ RazorPagesMovie.deps.json] does not exis**t, and the migration is not created and then not all the tables in the DataBase are created.
Solution:
In View -> SQL Object Explorer, you will find the DataBase with its tables.
Install-Package Microsoft.EntityFrameworkCore.Tools
I had this issue today, could not run my db tests.
the issue/fix for me was: the sln configuration was in
Releasemode which this project is NOT not built under. Switched back toDebug, clean, rebuildresharper test session is now running fine!
The deps.json does not exit error really threw me. turns out the issue was very simple abit not clear.
To repro,:
For any existing aspnetcore project, run command update-database and you will get same error.
Environment details: Aspnetcore 2.2 Visual studio 2019 community edition 16.1.5 Efcore Windows 10 64 bit machine
Encountered this issue in VS 2019 community edition running
dotnet ef dbcontext scaffold.Tried most of the suggestions here without success.
Despite building successfully before running it, what ended up working was to remove the
--no-buildoption from the command. After removing that it started working.I hope I have done what you have asked for - the report is at https://developercommunity.visualstudio.com/content/problem/804599/the-specified-depsjson-does-not-exist-after-vs-201-1.html
If needed I can send a report from my VM where the commend succeeds. HTH
This error is definitely environment related. I use a Mac book pro so I have VS 2019 Professional installed in a Parallels Desktop env on the Mac. The error occurs when I have a directory name which includes a space in the file path.
Error message:

I head over to powershell and tried to navigate to that directory. This showed me that the path was not accessible
The error disappeared when I removed the space in the name of the directory (Stores Setup) in the folder path Success:
I’m very sure this is just one of the few causes of this issue. But it sure seems to be related to locating files
FWIW I got this working by using Add… New Scaffolded Item … Controller (rather than Add Controller) … and that succeeded in producing an API controller (.net core 3) with access methods and EF. The Add Controller direct just screamed there were was a missing deps.json file, whatever that is, from the bin subfolder.
Thank you for the in depth information on installed components @alwilton. Unfortunately after installing additional workloads on my machine I still can’t reproduce this issue. Looking in Help -> About for me, I see no components that you have that I don’t have. Sadly its possible for other components to be installed that don’t show in Help -> About so its not an exhaustive list.
If you can, it would be great if you can reproduce the problem (run
(Get-Project ApiAuthSample).ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Valueto see it error) and then use the Report a Problem system in Visual Studio as that will capture a memory dump that will hopefully allow me to see more of what is going on. If you can link to the report that is created here, I will be able to find it more easily.I had same issues. The location of deps.json was pointing to different folder than the project folder. So I inspected my environment variables, and found that I had variable ProjectDir pointing to specific folder. The problem went away after I deleted the ProjectDir enviroment variable.