MVC 5 on Mono: Could not load file or assembly 'System.Web.Entity' or one of its dependencies

jeffmaher picture jeffmaher · Dec 6, 2014 · Viewed 23.3k times · Source

Goal: Startup a ASP.NET MVC 5 project on Mono via Xamarain Studio.

Error after starting server: Could not load file or assembly 'System.Web.Entity' or one of its dependencies.

enter image description here

Error in Xamarin Studio:

enter image description here

Background: The project was created in Visual Studio 2013 as a default web project. Most of the configuration is out of the box. Code for it can be viewed here on GitHub. I have the latest and greatest Mono and Xamarin Studio as of writing. The .NET Entity Framework is a resolved dependency and there are no build issues noted in Xamarin Studio.

How do I get this project up and running? How do I resolve this dependency?

Answer

Patrick Boyd Hesser III picture Patrick Boyd Hesser III · Jun 23, 2017

I know this is an old thread, but I ran across this while starting to port over an MVC project from VS for windows to VS for Mac. I found a better solution was to delete the reference to System.Web.Entity, and add the NuGet package System.Web.Http.Common. Hope it helps.