Skip to content

Add Migrations UI picks up old binaries - requires manually cleaning projects before running #198

@Brads3290

Description

@Brads3290

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

  1. Clone https://github.com/Brads3290/EfCoreUIRepro
  2. 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"
  3. Open ReproDbContext.cs and add in the Comments set (uncomment it), and also change the Console.WriteLine message.
  4. Repeat step 2
    • Notice the console message is still "Message one", and there are no changes in the migration
  5. 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)
Screen Recording 2023-09-20 at 9 35 01 am

Using dotnet ef CLI (working)
Screen Recording 2023-09-20 at 9 38 45 am

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions