-2

Have attached an image of all the packages and references I am trying to build an ASP.NET MVC Web Application on Visual Studio 2019 Community for Mac, but I am getting these errors. I tried a lot to resolve these, but couldn't find any answers online. It would be great if someone can help me figure these out.

This project was previously developed and build on Windows, but the same project does not build properly on Mac, and now I am getting these errors. One reason could be ASP.NET having different frameworks, but not sure which framework would be suitable for these packages.

Adding another picture, I have updated the ASP.NET framework to 4.7.2 from version 2.0 click to view image

And I left with very few errors only "System.Web.Entity" picture attached

Exel Gamboa
  • 936
  • 1
  • 14
  • 25

1 Answers1

2

System.Web.entity is for .NET Framework and Asp.Net MVC project is not cross-platform.

So,it's not possible to build ASP.NET MVC projects on the Mac that aren't based on .NET Core or Mono.ASP.NET 4.x is not something officially supported like ASP.NET Core on macOS.

If you want to use ASP.NET 4.x, stick to Windows. If you want to use macOS and VS for Mac, use ASP.NET Core. There is almost no gray area in between to discuss.

Another suggestion is that you could use virtual machine to run windows inside Mac.

Refer to Is it possible to develop ASP.NET MVC applications in Visual Studio for Mac?

Ryan
  • 19,118
  • 10
  • 37
  • 53