I have recently got a Mac M1, I have to build a Microservice based Web API application on Asp.net Core using EF & SQL Server.
I added EntityFrameworkCore(5.0.11) through NuGet Package successfully. The sdk & runtime installed details on my Mac is:
.NET SDKs installed: - 6.0.101 .NET runtimes installed: - Microsoft.AspNetCore.App 6.0.1 - Microsoft.NETCore.App 6.0.1
Firstly , I was not able to install SQL Server 2019 on Mac but after searching I found a solution for that by installing SQL Edge on Docker & connecting to Azure Data Studio and it's working fine.
Now the problem is I am not able to run EFcore migration add initial, Update Database through Entity Framework. I searched everywhere but whenever I am executing these command, I am getting following error:
Build started... Build succeeded. It was not possible to find any compatible framework version The framework 'Microsoft.AspNetCore.App', version '3.1.0' (arm64) was not found. - The following frameworks were found: 6.0.1 You can resolve the problem by installing the specified framework and/or SDK. The specified framework can be found at: - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=arm64&rid=osx.12-arm64.
I did install the above framework but that is x64. And still EF command are not working and I am not able to update the database. Is there any solution for this? Does EFCore work on Mac M1 machines?