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.
Error in Xamarin Studio:
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?
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.
I was able to work around this problem by getting the System.Web.Entity.dll
file from my Windows box. I found mine in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\
.
Once I copied that to the bin
folder of my project on my Mac, and updated the reference to include a HintPath
...
<Reference Include="System.Web.Entity" > <HintPath>..\bin\System.Web.Entity.dll</HintPath> </Reference>
the project would build in Xamarin Studio. It still showed the red X next to the reference (yes, even if I specified that it was a local copy and added a HintPath
), but at least it could find it.
I ended up getting another error about being unable to load System.Drawing.BitmapSuffixInSameAssemblyAttribute
, but hey, small progress!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With