-
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
Show a warning when the tools are used with a platform-specific app #32835
Comments
Seems like the same issue as #28022 |
Whoops wrong button 🥲 |
Note for triage: I am able to reproduce this. Also fails for EF7 on .NET 8 and EF7 on .NET 7, so not a regression. |
I did run into this same issue, and what I did was to comment out this and migrations succeeded //public ArchiveContext(DbContextOptions<ArchiveContext> options)
//: base(options) { }
|
And if you add a parameterless constructor to you dbcontext then migrations work also public ArchiveContext(DbContextOptions<ArchiveContext> options) : base(options) { }
public ArchiveContext() { } |
I have the same problem, I added a parameterless constructor and it still didn't work. Project --> Blazor Web App |
I have the same problem when using |
I also have the same problem. Please fix. |
I have the same problem in my Win UI 3 application which I generated by using the Template Studio plugin in VS 2022. My application requires the EF Core 7.0.17 with SQLite and the whole solution targets the |
I'm also facing the same problem. |
Issue still exists |
I had same problem. I had an ASP.Net React project and I had tried to create migration but it didn't work. I had had 2 startup project one for React one and for API and I had tried choosing only API project and it's worked. |
I currently am having this problem while trying to run db migration via github actions. |
Adding the empty constructor resolved the issue for me too. Thank you. |
#34082 should improve some cases starting with 9.0.0-rc1 when |
I used information from dotnet/efcore#32936 , dotnet/efcore#32835
The first sentence of the linked page is funny in this context: |
Hi Folks,
I am building a WinUI 3 app and want to use SQLite using ef core. When using the Microsoft.Extensions.Hosting package, the
dotnet ef migrations add
command doesn't give any errors but also doesn't give or log any errors. When removed from the .csproj file the and use Microsoft.Extensions.DependencyInjection, the migration is created without any problems.I created a small sample 3 app with ef core. In the current state of the project within App1.zip is Microsoft.Extensions.Hosting included.
Am I missing something?
How to reproduce?
dotnet ef migrations add InitialCreate -v
dotnet clean
dotnet ef migrations add InitialCreate -v
againCode
Project zip
App1.zip
The constructor in the App.xaml.cs.
Context factory
Output
Using Microsoft.Extensions.DependencyInjection
Using Microsoft.Extensions.Hosting
Include provider and version information
EF Core version:
Database provider: Microsoft.EntityFrameworkCore.SQLite (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: .NET 8
Operating system: Windows 11
IDE: Visual Studio 2022 17.9 Preview
The text was updated successfully, but these errors were encountered: