locked
dotnet ef CLI - Cannot find compatible framework version RRS feed

  • Question

  • User960236597 posted

    Hi, I am using the .NET command line tool for Entity framework, keying in

    dotnet ef dbcontext info

    It says cannot find compatible framework version. It is looking for Microsoft.NETCore.App version 3.1.1 but it detected a few versions including 2.1.14 which I am using.

    How do I configure it to use 2.1.14 and resolve this error? Preferably without uninstalling because I might want to use the version in the future

    Wednesday, January 22, 2020 7:59 AM

All replies

  • User281315223 posted

    It says cannot find compatible framework version. It is looking for Microsoft.NETCore.App version 3.1.1 but it detected a few versions including 2.1.14 which I am using.

    You should be able to install 3.1.1 here,which should resolve this particular issue.

    How do I configure it to use 2.1.14 and resolve this error?

    You are going to need to go within the properties of your application and choose .NET Core 2.1 as your preferred runtime, which should be an option since you have 2.1.14 installed.

    Preferably without uninstalling because I might want to use the version in the future

    You shouldn't need to install any of them unless you don't plan on using them moving forward. The installations will live side by side, and the only one that would possibly overwrite one another would be major point releases (e.g. 3.0 vs 3.1, etc.)

    Thursday, January 23, 2020 4:24 AM
  • User960236597 posted

    You are going to need to go within the properties of your application and choose .NET Core 2.1 as your preferred runtime, which should be an option since you have 2.1.14 installed.

    I configured global.json to use version 2.1.14:

    {
      "sdk": {
        "version": "2.1.14"
      }
    }

    Then I got this error:

    How do I resolve this?

    Thursday, January 23, 2020 6:08 AM
  • User960236597 posted

    Any help?

    Thursday, January 30, 2020 6:18 AM