-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package Manager Console Error with Multiple Startup Projects #26871
Comments
/cc @bricelam |
I am facing similar issue except I am able to add new migration, update database and so on. What I am trying to do is generate a sql script for a migration.
PS C:\Users\dev\Desktop\web-solution\src> dotnet ef migrations script 0 Initial -c ApplicationDbContext -p ./Migrations/Migrations.csproj -o ./Migrations/Application/Scripts
You can resolve the problem by installing the specified framework and/or SDK. The specified framework can be found at:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise>dotnet sdk check
|
I'm also facing the same issue as @DavidDury but I can't even add the migrations
|
From FairyFox5700/Disaster-Tracker-App#2 I found that installing |
I suspect you'll get a better error after PR #27671 |
I recent upgraded all the projects in my solution from .NET 5.0 to .NET 6.0.
The solutions builds and runs without error.
But when I attempt to add a migration, I get an error.
The problem, as it turns out, is that I have two projects set as the Startup Project: A client application and Web API application. If I set only the client application as the Startup Project, then the migration adds without error.
So I'm able to move forward but I do not understand the original error. Why is it looking for version 2 of Microsoft.NETCore.App? And why did upgrading to .NET 6.0 make this version no longer available? Is this a bug?
Include provider and version information
EF Core version:
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.0.1
The text was updated successfully, but these errors were encountered: