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
- Clone https://github.com/Brads3290/EfCoreUIRepro
- Add a migration using the ef core plugin
- Right-click on the
EfCoreUIRepro project, then Tools -> Entity Framework Core -> Add Migration
- Leave defaults and click OK. Wait for migration to finish.
- Notice the console message: "Message one"
- Open
ReproDbContext.cs and add in the Comments set (uncomment it), and also change the Console.WriteLine message.
- Repeat step 2
- Notice the console message is still "Message one", and there are no changes in the migration
- Clean the project, then repeat step 2 again
- Notice the console message has now changed, and the
Comments changes are now present in the migration
Expected 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):
- OS: MacOS Ventura 13.4.1 (M1)
- .NET SDK info (installed ones and version used within Rider):
- 6.0.408 [/usr/local/share/dotnet/sdk]
- 6.0.412 [/usr/local/share/dotnet/sdk]
- 7.0.203 [/usr/local/share/dotnet/sdk]
- 7.0.302 [/usr/local/share/dotnet/sdk]
- 7.0.306 [/usr/local/share/dotnet/sdk] (Used by rider)
- Plugin version: 232.1.0
- Rider version: 2023.2.1 (Build #RD-232.9559.61, built on August 23, 2023)
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 efdoes not exhibit this problem.To Reproduce
EfCoreUIReproproject, then Tools -> Entity Framework Core -> Add MigrationReproDbContext.csand add in theCommentsset (uncomment it), and also change theConsole.WriteLinemessage.Commentschanges 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 efcommand 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 efto pick up the old binaries.Screenshots
Using the UI (broken)

Using

dotnet efCLI (working)Environment (please complete the following information):