我有一个包含三个项目的解决方案。
- DomainModel(带有 ADO.NET 实体框架的 C# 库)
- DomainModelTest(业务逻辑单元测试)
- Web 应用程序(使用域模型)
由于某种原因,如果我传递 DomainModel 中的任何对象,我什至无法带来视图,甚至不简单。我收到以下错误:
有任何想法吗?
编译器错误消息:CS0012:
类型
'System.Data.Objects.DataClasses.EntityObject'
是在一个不是在程序集中定义的
参考。您必须添加参考
组装“System.Data.Entity”,
版本=3.5.0.0,文化=中立,
PublicKeyToken=b77a5c561934e089'。
来源错误:
第 146 行: 第 147 行:
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
148线:公开课
views_home_index_aspx :
System.Web.Mvc.ViewPage,
System.Web.SessionState.IRequiresSessionState,
System.Web.IHttpHandler { 第 149 行:
第 150 行:私有静态布尔值
@__初始化;
我认为这可能会有所帮助,实际错误出现在 Default.aspx 文件中的以下行中:
public partial class _Default : Page
{
public void Page_Load(object sender, System.EventArgs e)
{
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current); //**HERE**
HttpContext.Current.RewritePath(originalPath, false);
}
}
尝试在 web.config 的 部分中添加引用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)