-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add Migrations UI picks up old binaries - requires manually cleaning projects before running #198
Comments
Hi @Brads3290, thanks for the ticket, but I cannot reproduce the issue following your steps.
it's a really strange one. The EF Core plugin itself is just a facade over We also don't cache anything related to the build itself when executing commands. As you can see, the build process is starting from The only difference between using a terminal and using UI is that we set some .NET-related environments to skip the logo and propagate the same .NET root used by Rider:
|
Hi @seclerp, thanks for trying to replicate this - very strange. Out of curiosity, which OS were you using when you tried to reproduce the issue? I've just (re)tried clearing Rider caches and restarting my machine, just in case.. but the issue is still present on my end. I also tried to run the command from the terminal with those environment variables set, and it didn't reproduce the issue. |
I'm using the exact same setup - Ventura 13.4.1 on M1. Do you maybe have some additional configuration in Rider around the build system? |
Also, I have 2 more questions:
I will prepare a special build of the plugin with the ability to enable dotnet ef diagnostic logs and will send you. |
Here you go. Please check the "Enable diagnostic logging" checkbox under the Execution group and execute the command again. rider-efcore-232.1.1-verbose01.zip You can find the |
@andras-gyarmati, no, this is the expected behavior. "EF Core tools" means .NET CLI tool |
Hi @seclerp I was going to open a new issue but found this one, which might have the same cause... so here are my $0.02 The problem (I think) is that the plugin doesn't trigger a "save all files" before executing If you make a change to the model and issue an "Add Migration" immediately without saving, changes are not detected. And the reason cleaning the solution solves the problem is that it "saves all" (like any build action) under the hood, thus fixing the issue. So, the plugin should either save files or warn the user about unsaved files present. |
Hi @sburbano, thanks for the details! Yes, the plugin doesn't save anything before running operations, and it makes sense to do so. @Brads3290 could you confirm this is your case too? |
Describe the bug
The Add Migrations command (and presumably the other commands too) pick up old binaries when run, unless you manually clean the projects first.
Note: This is not an ef core CLI bug - see the Expected Behaviour section:
dotnet ef
does not exhibit this problem.To Reproduce
EfCoreUIRepro
project, then Tools -> Entity Framework Core -> Add MigrationReproDbContext.cs
and add in theComments
set (uncomment it), and also change theConsole.WriteLine
message.Comments
changes are now present in the migrationExpected behavior
You should not need to clean the solution in between adding migrations.
If you repeat the above steps but instead paste the generated
dotnet ef
command into the terminal (instead of clicking OK on the dialog), you will see that you don't need to clean in between migrations - it just rebuilds automatically.Something is happening behind the scenes with this plugin that's causing
dotnet ef
to pick up the old binaries.Screenshots
Using the UI (broken)
Using
dotnet ef
CLI (working)Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: