Mono 上的 MVC 5:无法加载文件或程序集“System.Web.Entity"或其依赖项之一 [英] MVC 5 on Mono: Could not load file or assembly 'System.Web.Entity' or one of its dependencies

查看:12
本文介绍了Mono 上的 MVC 5:无法加载文件或程序集“System.Web.Entity"或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标:通过 Xamarain Studio 在 Mono 上启动一个 ASP.NET MVC 5 项目.

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

启动服务器后出错:无法加载文件或程序集System.Web.Entity"或其依赖项之一.

Xamarin Studio 中的错误:

Error in Xamarin Studio:

背景:该项目是在 Visual Studio 2013 中作为默认 Web 项目创建的.大多数配置都是开箱即用的.它的代码可以在在此处在 GitHub 上查看.在撰写本文时,我拥有最新最好的 Mono 和 Xamarin Studio..NET 实体框架是一个已解决的依赖项,在 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.

我如何启动并运行这个项目?如何解决这种依赖性?

推荐答案

我知道这是一个旧线程,但我在开始将 MVC 项目从 VS for windows 移植到 VS for Mac 时遇到了这个问题.我发现更好的解决方案是删除对 System.Web.Entity 的引用,并添加 NuGet 包 System.Web.Http.Common.希望有帮助.

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.

这篇关于Mono 上的 MVC 5:无法加载文件或程序集“System.Web.Entity"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆