none
error MSB4006: There is a circular dependency in the target dependency graph involving target GetEFProjectMetadata RRS feed

  • Question

  • I followed steps that are explained in https://docs.microsoft.com/en-us/ef/core/get-started/netcore/new-db-sqlite to create a database for my WPF application. I installed Microsoft.EntityFrameworkCore.Sqlite and Microsoft.EntityFrameworkCore.Design via package manager (when I tried to install packages using commands I've got this error: The project does not support adding package references through the add package command.). and then I created a Model and DataContext but when I tried to add a new migration I get an error saying:

    …\ProjectName.csproj.EntityFrameworkCore.targets(4,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "GetEFProjectMetadata". […\ProjectName.csproj]
    Unable to retrieve project metadata. Ensure it's an MSBuild-based .NET Core project. If you're using custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option

    my WPF application uses .Net Framework 4.8. I changed .Net Framework version to 4.7.2 but didn't solve the problem. I created new WPF project and tried to create a new database but when i try to add a new migration i get the same error.


    Sunday, June 9, 2019 11:36 AM

All replies

  • Are you using VS2019 and .NET Core 3.0 that works with Windows desktop solutions such as WPF, becuase if you are not, then I don't see it working.

    Sunday, June 9, 2019 9:20 PM