Skip to content

Dotnet-ef mismatch causes apply Entity Framework migration fails when publishing an individual web app. #32782

@v-elenafeng

Description

@v-elenafeng

REGRESSION INFO: Worked in: 17.8.4 (Contains runtime 8.0.1).

TESTCASES AFFECTED
[8.0/7.0/6.0] SimpleWebAppWithIndAuth

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 Preview 2.1 latest released build, Preview channel
    • Web workload
    • Includes SDK 8.0.100 and runtime 8.0.0

REPRO STEPS

  1. New > ASP.NET Core Web App (Razor Pages) > .NET 8.0 > Individual Accounts
  2. Right click the project > Publish > Azure > Azure App Service (Windows)
  3. After the profile created, go to More actions > Edit, expand "Entity Framework Migration" node

ACTUAL
EF Migrations error: You must install or update .NET to run this application.
image

Workaround 1: Uninstall the dotnet-ef 8.0.1 and install version 8.0.0

dotnet tool uninstall dotnet-ef
dotnet tool install dotnet-ef --version 8.0.0

image

Workaround 2: Install runtime 8.0.1 Separately

EXPECTED
image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions