Closed vsfeedback closed 2 years ago
- dotnet tool uninstall --global dotnet-ef
- dotnet tool install --global dotnet-ef
- dotnet ef
- dotnet ef migrations --project YourProject.Data --startup-project YourProject.UI add InitialCreate
- dotnet ef database --project YourProject.Data --startup-project YourProject.UI update
It worked for me. I can create migration and db.
yeah...its good!
On Wed, Jan 27, 2021 at 4:52 AM malicone notifications@github.com wrote:
- dotnet tool uninstall --global dotnet-ef
- dotnet tool install --global dotnet-ef
- dotnet ef
- dotnet ef migrations --project YourProject.Data --startup-project YourProject.UI add InitialCreate
- dotnet ef database --project YourProject.Data --startup-project YourProject.UI update
It worked for me. I create migration and db.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dotnet/efcore/issues/16386#issuecomment-767820386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNXYY6LSZNTH4VM2U7ME2LS34TSPANCNFSM4H4WPOGA .
### 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 exist, 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.
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
- (Get-Project 'CoreWebTest').ConfigurationManager.ActiveConfiguration ...
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull
same error: The specified deps.json [C:\Users\xxxxx\source\repos\EFCoreTest01\EFCoreTest01.deps.json] does not exist
and null value error when I try: Get-Project 'Project_Name').ConfigurationManager.ActiveConfiguration.Properties.Item('OutputPath').Value
Using: Windows 10 Pro and Visual Studio Community 16.9.3
I am trying to scaffold a DB in a Blazor Web assembly project and I get this every time.
.net 5. From command line. See below
I am trying to scaffold a DB in a Blazor Web assembly project and I get this every time.
.net 5. From command line. See below
Same exact issue here.
Can you create a new issue? That looks like something new specific to Blazor web assembly projects...
I had similar issue. I closed Visual Studio. Then I re-opened the solution. Tried again. It worked.
I had the same issue in Azure Devops and was driving me crazy because i was using the release pipelines to deploy my changes. Basically after following the above directions for making sure entity framework is installed globally, i noticed that the code HAS to be built in order for that deps.json file to be generated which is in the bin folder and also most importantly it was in the bin debug folder for me, which means debug configuration. On azure devops the default configuration is release...
### 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 exist, and the migration is not created and then not all the tables in the DataBase are created.
Solution:
- In appsettings.json, in "DefaultConnection" remove the final part "MultipleActiveResultSets = true"
- In the package manager console (PowerShell), and having installed "Dotnet": a) dotnet tool uninstall --global dotnet-ef (To Remove it only if it exists) b) dotnet tool install --global dotnet-ef (To Install it if it does not exist) c) dotnet ef (To see that it is installed correctly) d) dotnet ef migrations add InitialCreate e) dotnet ef database update
In View -> SQL Object Explorer, you will find the DataBase with its tables.
I think that this is more an alternative but not a solution, i mean actually you are using dotnet CLI and the error is specific of package manager console.
What i want to use is Add-Migration from PMC, not "dotnet ef migrations add InitialCreate".
The error is still there, im using visual studio 16.9.4 and getting the same error in a new and clean project
Same here, solved today
I was thinking about some mess in VS project system manager assemblies and VS SDK's (maybe the Package Manager Console was loading the wrong assembly version and it wasn't unable to parse the "new" cproj project type). In my case I was right The issue started when I've installed and old version of VS (2008 in this case). Nor reinstall VS 2019 or repair it did work, but UNINSTALLING the old visual studio solved the problem for me
I hope it can help somebody
- dotnet tool uninstall --global dotnet-ef
- dotnet tool install --global dotnet-ef
- dotnet ef (This is only to check that "DOTNET EF" is installed correctly.)
- dotnet ef migrations --project YourProject.Data --startup-project YourProject.UI add InitialCreate
- dotnet ef database --project YourProject.Data --startup-project YourProject.UI update
This worked, but only after I changed directory into the subdirectory of the project with dbcontext and specified the full project name, including the .csproj file name extension.
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-build
option from the command. After removing that it started working.
Same issue in 2021
Repo https://github.com/davidbuckleyni/100daysofblazor Create a new Client server app.
Add EFCore
Add EFTools
Create Model
Create Service
Create Interface
Sill same issue as above
Version Informaiton Microsoft Visual Studio Community 2019 Version 16.10.3 VisualStudio.16.Release/16.10.3+31424.327 Microsoft .NET Framework Version 4.8.04161
Installed Version: Community
Visual C++ 2019 00435-60000-00000-AA931 Microsoft Visual C++ 2019
.NET Core Debugging with WSL 2 1.0 .NET Core Debugging with WSL 2
ASP.NET and Web Tools 2019 16.10.526.50910 ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.10.526.50910 For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.10.526.50910 Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.10.526.50910 Azure Functions and Web Jobs Tools
C# Tools 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416 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.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
GitHub.VisualStudio 2.11.106.19330 A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.40423.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.1.113+g422d40002e.RR 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 C++ Wizards 1.0 Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers 1.2 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.
Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 16.10.15 (552afdf) Support for debugging Mono processes with Visual Studio.
Node.js Tools 1.5.30310.1 Commit Hash:e550dd1b679956810ccace4368dbc7a64443213b Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 5.10.0 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
Razor (ASP.NET Core) 16.1.0.2122504+13c05c96ea6bdbe550bd88b0bf6cdddf8cde1725 Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 16.0.62106.24090 Microsoft SQL Server Data Tools
Syncfusion ASP.NET Core (Essential JS 1) Project Templates 19.1.0.54 Provides project templates for creating an ASP.NET Core Web Application using Syncfusion Essential JS 1 components.
Syncfusion ASP.NET MVC (Essential JS 1) Project Templates 13.4.0.53 Provides project templates for creating ASP.NET MVC (Essential JS 1) Web Applications using Syncfusion components.
TypeScript Tools 16.0.30429.2002 TypeScript Tools for Microsoft Visual Studio
UnoPlatformPackage Extension 1.0 UnoPlatformPackage Visual Studio Extension Detailed Info
Visual Basic Tools 3.10.0-4.21318.11+7ceb633154acb9d716fd3eb2b6df1a0468d8e416 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 16.10.0-beta.21262.7+1b23bbeda88ea3cb9be9af777f4c99fa8663df81 Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio.
Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers
VisualStudio.DeviceLog 1.0 Information about my package
VisualStudio.Foo 1.0 Information about my package
VisualStudio.Mac 1.0 Mac Extension for Visual Studio
Xamarin 16.10.000.234 (d16-10@ecaf29b) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.10.0.115 (remotes/origin/c750fbf1bde3c720d077f51640fe197c6dac7cbe@c750fbf1b) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.10.5 (355b57a) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 11.3.0.4 (d16-10/ae14caf) Xamarin.Android Reference Assemblies and MSBuild support. Mono: b4a3858 Java.Interop: xamarin/java.interop/d16-10@f39db25 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.35.4@85460d3 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-10@c5732a0
Xamarin.iOS and Xamarin.Mac SDK 14.20.0.24 (c4b89cddb) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Has anyone filed a new issue for the error on Blazor?
Create new .net core MVC project, run it, stop debug, then write in Package Manager Console the string to add migration:
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: