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:\testefTestEf2\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>
What is the output of running this in Package Manager Console?
(Get-Project 'TestEf2').ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Value
I have the latest one Version 16.1.5 and still I am getting the same error.
running
Get-Project 'Project_Name').ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Value, throwing error from Package Manager console.
You cannot call a method on a null-valued expression.
At line:1 char:1
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
What is the "Azure Development," component?
Can you send us a simple repro so we can help get it fixed?
Azure development option available during visual studio installation.I un-installed it and efcore issue resolved
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
I am having similar issue with my newly installed Visual Studio Professional 2019 16.1.6 (alongside VS Professional 2017) on Windows 10 machine. I created a sample ASP.NET Core 2.1 Web Application (MVC). The solution builds successfully. However, when I try running "Add-Migration InitialCreate" command in Package Manager Console. I'm getting the error "The specified deps.json ... does not exist".
I tried creating identical project using Visual Studio Professional 2017 on the same machine and I was able run migration commands without error.
I searched online for solutions and tried a number of suggestions including copying bin\debug folder to bin\MCD\debug and uninstalling azure related components but nothing seems to work.
UPDATE:
I cloned the project to another machine with single but just a bit older installation of Visual Studio (VS Professional 2019 16.0.4) and the migration commands runs without error. So it's either the new version 16.1.6 or installing VS 2019 alongside 2017 which is causing the error?
@corix010 Can you post your project/solution here so we can investigate?
@ajcvickers I am certain there's no problem with the sample projects. Please see update in my previous comment.
Same issue with ASP.NET Core 2.2 and the latest VS 2019 update. On my other laptop everything runs fine. It doesn't work on my HP Omen. I read about HP and MCD but it doesn't seem to help or I'm doing something wrong. I will do more research.
Same issue here. I am just adding a view from the controller (right click Add View select Empty template). Uninstalling Azure Development as suggested above did not resolve the issue.
I cleaned and rebuild the solution and checked the \bin\Debug\netcoreapp2.2\ folder and it's empty.
So, that's where the issue lies. The error happens because it's looking for that "deps.json" file which was not found due to build errors.
I have to resolve the build errors first to add a view.
Adding static views should not be dependent on that one particular file right???
Visual Studio Professional 2019 version 16.2.3
Project: Asp.Net Core MVC (.Net Core 2.2)
See attached.
I have the same version of Visual Studio and .NET Core as @joelrb
I am encountering the same exact error when adding controller or basically any creation of a new item in the solution when using a template.
The screenshot attached in the post by @joelrb above is identical to what I would provide.
Any ideas for me to try?
I'm not able to repro this on 16.3 Preview 4. Hopefully that means it's fixed. Let me try on 16.2.5 just to confirm.
Hmm, 16.2.5 didn't repro either... Maybe it was fixed in 16.2 and the scaffolding issue is different. (possibly https://github.com/aspnet/Scaffolding/issues/522)
I am using VS 2019 16.2.5. I have attempted to follow the razor pages tutorial and the MVC tutorials multiple times. Each time I run the command add-Migration Initial I get the following error.
The specified deps.json [C:\Users\John\Documents\My Web Sites\RazorPagesMovie2\RazorPagesMovie\RazorPagesMovie.deps.json] does not exist
Willing to try any suggestions you may have. Thanks.
Do you have any build errors? You need to fix those before scaffolding
Also, if you can send me a repro project, I’d be happy to investigate more
Thank you for the reply. I have no build errors. Will have the repro project to you shortly.
Repro attached. Looking forward to your thoughts.
RazorMovieApp_Tutorial.zip
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.
Where is the ProjectDir variable located? Would like to replicate deleting ProjectDir environment variable to see if it resolved my issues.
ProjectDir was under Windows Environment Variables for User. I don't remember adding it, but deps.json was pointing to bin directory under directory mentioned in ProjectDir.
It still remains on .NET Core 3.0.
@JohnnyB77 I'm not able to repro the issue with your project on my machine. What is the result of running the following command inside PMC?
(Get-Project RazorPagesMovie).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value
@Hulkstance Do you have a project I can try?
bricelam, I cut and pasted the command you provided and got the following result on the PMC.
PM> (Get-Project RazorPagesMovie).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value
You cannot call a method on a null-valued expression.
At line:1 char:1
Anything else that I could try?
Which part is null? (Get-Project RazorPagesMovie).ConfigurationManager.ActiveConfiguration
? I've seen a few people reporting this, it could be an issue in dotnet/project-system
I have tested
Repro attached. Looking forward to your thoughts.
RazorMovieApp_Tutorial.zip
I have tested it with Visual studio Community 2019 Version 16.3.1 and there is no such issue with add-migration or update-database. it's working fine.
I have run this command:
(Get-Project RazorPagesMovie).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value
Output is:
bin\Debug\netcoreapp2.2\
I'm using 16.3.1 and having the same problem @joelrb mentioned. If the project has build errors, I cannot add a page. I receive the same error as in his screenshot.
I have a project that does not run into this error. However, when moving my project to a different location on my computer I encounter this same error. If I open the original project (in the original location) I don't get this error. It seems very strange to me.
i have the same problem i m using de last version vs 2019
PM> Add-Migration initial -v
Using project 'ApiRentMe'.
Using startup project 'ApiRentMe'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\GitHubxxx-back\RentMeWebApixxxx.deps.json --additionalprobingpath "C:\Users\Diego Suarez.nuget\packages" --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Diego Suarez.nuget\packages\microsoft.entityframeworkcore.tools\3.0.0\tools\netcoreapp2.0\any\ef.dll" migrations add initial --json --verbose --no-color --prefix-output --assembly D:\GitHubxxxx-backxxxxxxxx.dll --startup-assembly D:\GitHubxxxx-backxxxxxixxxx.dll --project-dir D:\GitHubxxxx-backxxxxx\ --language C# --working-dir D:\GitHubxxxx-back --root-namespace xxxx
The specified deps.json [D:\GitHubxxxx-backxxxxixxxx.deps.json] does not exist
The same problem vs2019 16.3.3
Win10 19.03
add-migration init -v
Using project 'DWL.Web'.
Using startup project 'DWL.Web'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\VS2019\DWL\DWL\DWL.Web\DWL.Web.deps.json --additionalprobingpath C:\Users\admin.nuget\packages --additionalprobingpath C:\Microsoft\Xamarin\NuGet C:\Users\admin.nuget\packages\microsoft.entityframeworkcore.tools\3.0.0\tools\netcoreapp2.0\any\ef.dll migrations add init --json --verbose --no-color --prefix-output --assembly D:\VS2019\DWL\DWL\DWL.Web\DWL.Web.dll --startup-assembly D:\VS2019\DWL\DWL\DWL.Web\DWL.Web.dll --project-dir D:\VS2019\DWL\DWL\DWL.Web\ --language C# --working-dir D:\VS2019\DWL\DWL --root-namespace DWL.Web
The specified deps.json [D:\VS2019\DWL\DWL\DWL.Web\DWL.Web.deps.json] does not exist
Note from triage: we are not able to reproduce this. There must be something about the environment that is impacting this in a way that is not apparent. If someone has any ideas what this might be, then we can continue to investigate, but as of now we are out of ideas.
Things began working for me after I updated visual studios
For me:
Package Manager try to find in D:\VS2019\DWL\DWL\DWL.Web\DWL.Web.deps.json
But File in d:\VS2019\DWL\DWL\DWL.Web\bin\Debug\netcoreapp3.0\
Any idea how can I change path?
p.s. Reinstall win10(1903) and vs2019(16.3.4) on my comp - the problem still exists.
smth with comp - replaced the computer the problem is gone
@StarikKsardas Can you share your project?
Same issue here, using VS P 16.3.5 in a VM with Parallel and tried with all your suggestions but i'm getting the same error. I don't know why when i make a restore i lose all my project references, apear with the yellow warning. can that mean something ?
Was able to reproduce, I think, when using IHostingEnvironment instead of Microsoft.AspNetCore.Hosting.IWebHostEnvironment
@ccr8 @adamdewolf Can you please post a project that reproduces what you are seeing?
@StarikKsardas
https://github.com/aspnet/EntityFrameworkCore/issues/16386#issuecomment-535668335
Same issue here.
VS 2019 V16.3.6 gives the error
VS 2017 Works fine
I have run this command:
(Get-Project MyProject).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value
Output :
**You cannot call a method on a null-valued expression.
At line:1 char:1
then I ran this command:
(Get-Project Cupcakes).ConfigurationManager.ActiveConfiguration
Output:
DTE : System.__ComObject
Collection : System.__ComObject
ConfigurationName : Debug
PlatformName : Any CPU
Type : 1
Owner : Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject
Properties :
IsBuildable : True
IsRunable : True
IsDeployable : False
Object : Microsoft.VisualStudio.ProjectSystem.VS.Properties.CSharp.CSharpProjectConfigurationProperties
ExtenderNames : {}
ExtenderCATID : {89FB23F7-E591-.......}
Notice the value of Properties is Null
Hope this helps to put you on the right track to solve this issue.
@davkean Any ideas what might be going on here?
@davidwengier This looks like the same issue we ran into with the CodeAnalysis telemetry where Properties was returning null. I don't think we even figured out the root cause for this. A repro project would be amazing.
Looks like the same root issue, yes, but from reading the comments it seems more machine based than project based. Certainly with the supplied RazorPagesMovie.zip from above, I don't repro the issue with or without the Azure workload installed, on 16.3.4.
This issue has been driving me nuts. Yes, it seems machine based. From my main workstation which has been installed from scratch one month ago and is a Windows 10 Enterprise Version 1903 with VS 2019 16.3.7 running (Get-Project ApiAuthSample).ConfigurationManager.ActiveConfiguration on a problem project I get
DTE : System.__ComObject
Collection : System.__ComObject
ConfigurationName : Debug
PlatformName : Any CPU
Type : 1
Owner : Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject
Properties :
IsBuildable : True
IsRunable : True
IsDeployable : False
Object : Microsoft.VisualStudio.ProjectSystem.VS.Properties.CSharp.CSharpProjectConfigurationProperties
ExtenderNames : {}
ExtenderCATID : {89FB23F7-E591-4a2f-8E0F-64C0522FCF77}
OutputGroups : System.__ComObject
Blank Properties - I did a fresh install of the same VS on an identical OS on a VM and copied the project over, built the project and ran the same PMC command and got:
DTE : System.__ComObject
Collection : System.__ComObject
ConfigurationName : Debug
PlatformName : Any CPU
Type : 1
Owner : Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject
Properties : System.__ComObject
IsBuildable : True
IsRunable : True
IsDeployable : False
Object : Microsoft.VisualStudio.ProjectSystem.VS.Properties.CSharp.CSharpProjectConfigurationProperties
ExtenderNames : {}
ExtenderCATID : {89FB23F7-E591-4a2f-8E0F-64C0522FCF77}
OutputGroups : System.__ComObject
*Properties now exist. Further running the following command gets an expected result
(Get-Project ApiAuthSample).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value
bin\Debug\netcoreapp3.1\
If it has anything to do with the installed products I offer:
On the VM I did a minimal install of VS, Here are the installed products On the main (failing) machine:
Microsoft Visual Studio Professional 2019
Version 16.3.7
VisualStudio.16.Release/16.3.7+29424.173
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Professional
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
Application Insights Tools for Visual Studio Package 9.1.00913.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2019 16.3.286.43615
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.3.286.43615
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.3.286.43615
Azure App Service Tools v3.0.0
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.4.2000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 16.3.286.43615
Azure Functions and Web Jobs Tools
Azure Stream Analytics Tools for Visual Studio 2.4.2000.0
Microsoft Azure Stream Analytics Tools for Visual Studio
C# Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure HDInsight Azure Node 2.4.2000.0
HDInsight Node under Azure Node
Microsoft Azure Hive Query Language Service 2.4.2000.0
Language service for Hive query
Microsoft Azure Stream Analytics Language Service 2.4.2000.0
Language service for Azure Stream Analytics
Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20816.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.0.83+gbc8a4b23ec
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Mono Debugging for Visual Studio 16.3.7 (9d260c5)
Support for debugging Mono processes with Visual Studio.
Node.js Tools 1.5.10807.1 Commit Hash:4d3cf548113f5a53a02d83a877ee24e764b2cde4
Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 5.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Office Developer Tools for Visual Studio 16.0.29217.00
Microsoft Office Developer Tools for Visual Studio
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.61908.27190
Microsoft SQL Server Data Tools
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript Tools 16.0.10821.2002
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.4 for F# 4.6 16.3.0-beta.19455.1+0422ff293bb2cc722fe5021b85ef50378a9af823
Microsoft Visual F# Tools 10.4 for F# 4.6
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
Xamarin 16.3.0.277 (d16-3@c0fcab7)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.3.0.246 (remotes/origin/d16-3@bd2f86892)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.3.565 (27e9746)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 10.0.3.0 (d16-3/4d45b41)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono/2019-06@5608fe0abb3
Java.Interop: xamarin/java.interop/d16-3@5836f58
LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
LibZip: nih-at/libzip/rel-1-5-1@b95cf3fd
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.27.1@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333
Xamarin.iOS and Xamarin.Mac SDK 13.4.0.2 (e37549b)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Here are the installed products on the VM (successful) machine:
Microsoft Visual Studio Professional 2019
Version 16.3.7
VisualStudio.16.Release/16.3.7+29424.173
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Professional
Application Insights Tools for Visual Studio Package 9.1.00913.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2019 16.3.286.43615
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.3.286.43615
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.3.286.43615
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.3.286.43615
Azure Functions and Web Jobs Tools
C# Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20816.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.0.83+gbc8a4b23ec
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
NuGet Package Manager 5.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.61908.27190
Microsoft SQL Server Data Tools
TypeScript Tools 16.0.10821.2002
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.4 for F# 4.6 16.3.0-beta.19455.1+0422ff293bb2cc722fe5021b85ef50378a9af823
Microsoft Visual F# Tools 10.4 for F# 4.6
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Hope this helps - Let me know if I can offer any other environment information.
I have the same issue.
VS Version 16.3.7 under Windows 7, solution with .net core 3
Solution was migrated from .net core 2.2 to .net core 3
When trying to execute Add-Migration command it shows error:
The specified deps.json [E:\projects\XXX\src-dev\YYY\YYY.deps.json] does not exist
Path for deps.json is always the same: there is no difference what project is selected as default project in package manager console and it is no difference what output path is specified for project YYY.
Actually deps.json exists in directory where artifacts of the project YYY are located (YYY/bin/Debug/netcoreapp3.0/).
If to copy it to the desired path as specified in error message, the following error appears:
Error:
An assembly specified in the application dependencies manifest (YYY.deps.json) was not found:
package: 'DevExtreme.Extensions', version: '1.0.0'
path: 'DevExtreme.Extensions.dll'
DevExtreme.Extensions is one of projects in my solution.
Then I tried to edit this stupid deps.json manually and add absolute path to all libraries it can't found.
References to libraries look like this (we need to specify path for runtime section):
"DevExtreme.Extensions/1.0.0": {
"dependencies": {
"DevExtreme.AspNet.Core": "19.2.3",
"Newtonsoft.Json": "12.0.2"
},
"runtime": {
"e:/projects/XXX/src-dev/YYY/bin/Debug/netcoreapp3.0/DevExtreme.Extensions.dll": {}
},
"compile": {
"DevExtreme.Extensions.dll": {}
}
},
After that, the following error appears:
System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive)
at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String dataDirectory, String rootNamespace, String language)
at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor()
at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute()
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Unfortunately, other manual manipulations with deps file didn't change anything.
I also tried to use -v with Add-Migration command.
It shows command with wrong paths:
C:\Program Files\dotnet\dotnet.exe exec --depsfile E:\projects\XXX\src-dev\YYY\YYY.deps.json --additionalprobingpath C:\Users\Shiko\.nuget\packages --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" C:\Users\Shiko\.nuget\packages\microsoft.entityframeworkcore.tools\3.0.0\tools\netcoreapp2.0\any\ef.dll migrations add DocTemplate --json --verbose --no-color --prefix-output --assembly E:\projects\XXX\src-dev\YYY\YYY.dll --startup-assembly E:\projects\XXX\src-dev\YYY\YYY.dll --project-dir E:\projects\XXX\src-dev\YYY\ --language C# --working-dir E:\projects\XXX\src-dev --root-namespace YYY
After fixing paths and running this command in console output shows error like shown above.
If to keep --deps parameter, output is:
info: System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
info: File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
info: at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive)
info: at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
info: at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String dataDirectory, String rootNamespace, String language)
info: at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor()
info: at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute()
info: at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
info: at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
error: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
If to remove --deps parameter, output is:
info: System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
info: File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
info: at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive)
info: at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
info: at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String dataDirectory, String rootNamespace, String language)
info: at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor()
info: at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute()
info: at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
info: at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
error: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any recommendations found at stackoverflow or somewhere else are completely useless in my case.
I've made some additional experiments and it seems I've found a workaround.
If to roll back to .net core 2.2 and try to add migration in VS 2019, the same problem occurs. As follows from additional output, it uses EF Core 3 to execute Add-Migration command.
If switch to VS 2017, everything is ok.
I tried to investigate command line formed in VS 2017 and found that it contains parameter that was missed in VS 2019:
--runtimeconfig E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\YYY.runtimeconfig.json
But VS 2017 builds command line to launch EF Core 2.2.6.
I tried to insert this parameter into command line built by VS 2019 (with path to EF Core 3) and it worked as expected (exception was raised with message that no DbContext found in assembly YYY):
"C:\Program Files\dotnet\dotnet.exe" exec --depsfile E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\YYY.deps.json --additionalprobingpath C:\Users\Shiko\.nuget\packages --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" --runtimeconfig E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\YYY.runtimeconfig.json C:\Users\Shiko\.nuget\packages\microsoft.entityframeworkcore.tools\3.0.0\tools\netcoreapp2.0\any\ef.dll migrations add DocTemplate --json --verbose --prefix-output --assembly E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\YYY.dll --startup-assembly E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\YYY.dll --project-dir E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp2.2\ --language C# --working-dir E:\projects\XXX\src-dev --root-namespace YYY
Now I can build a command line that will do what I need:
"C:\Program Files\dotnet\dotnet.exe" exec --depsfile E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp3.0\YYY.deps.json --additionalprobingpath C:\Users\Shiko\.nuget\packages --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" --runtimeconfig E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp3.0\YYY.runtimeconfig.json C:\Users\Shiko\.nuget\packages\microsoft.entityframeworkcore.tools\3.0.0\tools\netcoreapp2.0\any\ef.dll migrations add DocTemplate --json --verbose --prefix-output --assembly E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp3.0\XXX.Dal.dll --startup-assembly E:\projects\XXX\src-dev\YYY\bin\Debug\netcoreapp3.0\YYY.dll --project-dir E:\projects\XXX\src-dev\Database\XXX.Dal\ --language C# --working-dir E:\projects\XXX\src-dev --root-namespace XXX.Dal
This command line adds expected migration.
It seems obvious the problem is in command-line generation. Scaffolding tool works well. I've read a lot of posts about the same issue under different versions of VS, therefore problem is located somewhere in command line generator.
P.S. Some notes on workaround "how-to".
It could be useful to create cmd file with this command line. Migration name "DocTemplate" has to be replaced with %1 (reference to cmd parameter number 1). Then this cmd file could be added into "External tools" list in VS Tools menu. Check the "Prompt for arguments" option -- VS will prompt for arguments to be passed to cmd file before execution. We have only one argument -- name of migration to create.
How to create a migration step-by-step:
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').Value
to 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 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
If you can, it would be great if you can reproduce the problem (run
(Get-Project ApiAuthSample).ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Value
to 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 have exception if to run this over my project XXX (Properties object is null):
(Get-Project XXX).ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath')
Will it be useful if I will send report through Report System too?
Triage: closing this here as a problem has been reported to VS and there is nothing actionable on the EF side at this point. We can re-open if the situation changes.
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.
This boils down to an environment issue and VS 2019. For me the workaround is to use the CLI instead of VS. See https://developercommunity.visualstudio.com/content/problem/800508/new-scaffolded-item-razor-pages-using-entity-frame.html for the underlying problem that is still not fixed as of today.
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
Working solution via Alan Wilton
the only viable work around is to use the command line interface (CLI). I've been able to do what I need to do so far with that but it is a pain and irritating to need to do that. For instance you would open a command prompt in your project root folder and enter something like "dotnet ef dbcontext scaffold "server=192.168.100.10;port=3306;user=myusername;password=mypasword;database=thedatbase" Pomelo.EntityFrameworkCore.MySql -o Models\thedatabase -d" to scaffold a database.
reference https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
Peter
Have similar issue when trying to add controller (Add API Controller with actions, using Entity Framework) to a asp.net core 3.1 server using VS2019 16.5.1
missing [projectname].server.deps.json.
Have had the same issue, deps file at wrong location (inside \bin\debug\etc...), if moved manually it worked but then migration were not applied ...
none of the advices in this feed worked, then i tried with visual 2017, and everything worked ...
I experienced this problem today when adding scaffolding for Identity, but it started working after I updated Visual Studio to 16.5.3. Luckily, I was creating a new project. I don't know if updating would resolve the problem in an existing project.
Experiencing same issue when using Add-Migration InitialCreate command: _*.deps.json_ is not found in _ProjectDir_ (however, it does exist in '.\bin\debug\netcoreapp3.1\'). Tried every solution written above - nothing helped (except one workaround).
Setup:
Workaround:
Don't use VS _Package Manager Console_ to create / update database, but instead use command line.
Open _cmd_ and follow these steps. It created migrations and after running second command (update) database too. Not comfortable, but you can live with that as after running those commands you can continue using VS as normal (until you need to update create new migrations again).
Bear in mind: Database was created in _ProjectDir_ so had to move it into _debug dir_ by myself.
This happened for me today. I am creating a project in VS 2019 (16.5.3) that uses Entity Framework Core SqlLite (3.1.3)
Steps to reproduce.
I was able to resolve the issue by uninstalling the Microsoft.EntityFrameworkCore.SqlLite package and installing Microsoft.EntityFrameworkCore.SqlServer instead.
I encountered a similar error today. Somehow it was resolved after I had resolved all build errors.
I ran into the same problem. And for my case, I check the .csproj file and this has double row PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design". I remove one of them. Maybe help someone.
Same problem after update to VS Version 16.6.0.
Just tried to add new column.
Solved by updating all packages with NuGet Package Manager.
Something had happened with my projects today and I've started experiencing the same issue. No updates of VS these days.
CLI doesn't work too.
For several projects I've generated the deps file this way: I have added the line
<UsingTask TaskName="GenerateDepsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
into project file and then published it. Then I copied generated deps file into the folder where VS expected it to be. But I can't publish some projects due to the same error.
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
@pankajrayal wrote:
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
Just note for any future users, you need to install the ef tool first:
dotnet tool install --global dotnet-ef
then dotnet ef migrations add InitialCreate
or dotnet ef database update
.
Also, if you want to use anything other than the current stable version use the --version flag with whatever version you want.
re: deps.json does not exist on Scaffold-DbContext
environment issue (can happen on ANY recent version of VS)
including 16.7.6 AND Version 16.8.0 Preview 5.0
Removing/Adding Azure package from VS installer does NOT help (for me)
It was working fine a couple weeks ago and I've never had Azure package installed.
I am facing this issue this is my verbose response from the command:
C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\3.1.9\tools\netcoreapp2.0\any\ef.dll" database update --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework
The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist
I cant Understand, so many people is facing this problem why so close the ticket? this is a real problem.
:/
To provide an update... The .NET project system team thinks this is caused by either a corrupted solution file or by having an invalid Active solution configuration selected.
We've updated the error in EF Core 5.0 to provide more details and hopefully get to the bottom of this.
/cc @lifengl
Brice, Thank you for staying on top of this. Please see my try to cut to the chase on this issue here 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. Further I recently moved my workstation to a VM and it still has the issue. I also wiped my workstation completely (the old FDISK and FORMAT) and re-installed a different version of W10 and it still has the issue. Meanwhile a clean install of a VM on my Dev Server does not have the issue.
@bricelam
hi Brice, I just change the configuration file, tested and the problem is not solved. If you want I can provide you access to my computer so you can see the error.
this is my solution file text
Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrudEntityFramework", "CrudEntityFramework\CrudEntityFramework.csproj", "{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
EFCoreTest|Any CPU = EFCoreTest|Any CPU
EFCoreTest|x64 = EFCoreTest|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|x64.ActiveCfg = Debug|x64
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Debug|x64.Build.0 = Debug|x64
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|Any CPU.ActiveCfg = EFCoreTest|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|Any CPU.Build.0 = EFCoreTest|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|x64.ActiveCfg = EFCoreTest|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.EFCoreTest|x64.Build.0 = EFCoreTest|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|Any CPU.Build.0 = Release|Any CPU
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|x64.ActiveCfg = Release|x64
{12C65EEE-22C6-4C64-A312-D7A4D589F3E6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {353C6B28-8C3E-4A85-951E-4A2DBFBC488A}
EndGlobalSection
EndGlobal
this is my csproj file
the verbose log.
PM> Add-Migration f -v
Using project 'CrudEntityFramework'.
Using startup project 'CrudEntityFramework'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\3.1.9\tools\netcoreapp2.0\any\ef.dll" migrations add f --json --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework
The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist
I updated to EF 5.0.0-rc.2.20475.6 RC and the error continue.
PM> Add-Migration f -v
Using project 'CrudEntityFramework'.
Using startup project 'CrudEntityFramework'.
Build started...
Build succeeded.
C:\Program Files\dotnet\dotnet.exe exec --depsfile D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json --additionalprobingpath "C:\Users\Pablo Castillo\.nuget\packages" --additionalprobingpath C:\Microsoft\Xamarin\NuGet --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" "C:\Users\Pablo Castillo\.nuget\packages\microsoft.entityframeworkcore.tools\5.0.0-rc.2.20475.6\tools\netcoreapp2.0\any\ef.dll" migrations add f --json --verbose --no-color --prefix-output --assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --startup-assembly D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.dll --project-dir D:\tutoriales\CrudEntityFramework\CrudEntityFramework\ --language C# --working-dir D:\tutoriales\CrudEntityFramework --root-namespace CrudEntityFramework
The specified deps.json [D:\tutoriales\CrudEntityFramework\CrudEntityFramework\CrudEntityFramework.deps.json] does not exist
@pmcastillo79 Can you share a repro project/solution?
@pmcastillo79 Can you share a repro project/solution?
@davkean
sure
is here
https://github.com/pmcastillo79/EFCoreTestTutorial
PD: The Migration folder was created using the commands outside the visual studio, the problem is inside the visual studio command prompt.
if you use dotnet-ef commands works. But is outside the visual studio IDE.
/cc @lifengl
@davkean @bricelam @lifengl I can gave you remote access to my computer if you want so you can check some enviroment values. I want to solve this problem.
I'm experiencing the same issue
Ran this command on the command line:
dotnet ef dbcontext scaffold "Server=localhost;Database=DevOps;Integrated security=SSPI;Trusted_Connection=True;MultipleActiveResultSets=true" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Model -Force
Get this output:
The specified deps.json [C:\WORK\Repos\Titan\src\bin\Debug\netcoreapp3.1\Persistence.MsSql.deps.json] does not exist
As a workaround I created a console application generated the files copied them to my project and changed the namespace
Workaround: Even when the CLI is broken showing this error, I've had some success if I add the EF
Design NuGet package first into the project and try then. It's possible the sequence in which you add the various EF NuGet and attempt a Scaffold will help out (as lame as that is) .
Triage: closing this here as a problem has been reported to VS and there is nothing actionable on the EF side at this point. We can re-open if the situation changes.
Scaffolding DB First is major functionality, please re-open even if the EF core team cannot take action.
@bwjunkie I think you're hitting a different error. Could you submit a new issue with a repro project attached?
I had this issue today, could not run my db tests.
the issue/fix for me was: the sln configuration was in Release
mode which this project is NOT not built under.
Switched back to Debug
, clean, rebuild
resharper 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.
@bwjunkie I think you're hitting a different error. Could you submit a new issue with a repro project attached?
@bricelam
sure, its the same output others have posted. but here ya go... (on this test repo the CLI is working but not PM)
https://github.com/dotnet/efcore/issues/23300
I'm also hitting this problem on the latest vs (16.8.1) as of today. I started a whole new .net core 5 project and I can't use EF core... Is there a workaround? The only solution I found was to copy all my bin\debug folder into the root folder of the solution each time I build, which kind of sucks.
To provide an update... The .NET project system team thinks this is caused by either a corrupted solution file or by having an invalid Active solution configuration selected.
We've updated the error in EF Core 5.0 to provide more details and hopefully get to the bottom of this.
Is this serious? The problem happens when I do New Project, add EF, then it happens. How is this a corruption???
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).
I had the same error when the project was on my NAS. The build succeeded with no errors after I moved the project to my local drive.
I had the same error when the project was on my NAS. The build succeeded with no errors after I moved the project to my local drive.
Thx this fixed all my worries, the moment I copied my project to a local drive, problem solved, earlier it was in a network share.
@pmcastillo79 Can you share a repro project/solution?
@davkean
sure
is here
https://github.com/pmcastillo79/EFCoreTestTutorial
PD: The Migration folder was created using the commands outside the visual studio, the problem is inside the visual studio command prompt.
if you use dotnet-ef commands works. But is outside the visual studio IDE.
I have the same problem. My user temp and my blazor webassy asp.net core hosted are on the D: drive
So, what should I do? Stop using migrations? I have no idea what to do. I had that problem in another project and I copied all the bin into the root folder of the project each time I had to do anything in the package manager console. I started a NEW PROJECT and I also have the problem... I don't know what to do? Go back to the real .net framework (4.8)? I mean, I have the impression I'm using something that's not mature and many years behind EF for the 4.8 framework!!!
Here is what I do, using visual studio 2019 16.8.2:
And bam:
Please don't tell me this is normal, that my solution file is corrupted or that my build configuration is broken. It does that with a clean new project.
@nbelley Try to move your code / project to the c: drive
@nbelley Try to move your code / project to the c: drive
@ErikEJ Same thing:
Here is what I do, using visual studio 2019 16.7.5:
And result:
@nbelley Try to move your code / project to the c: drive
@ErikEJ Same thing:
Have you solved this issue?
Most helpful comment
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).