asp.net-mvc-3 – ViewBag.Title错误
发布时间:2020-05-23 12:32:16 所属栏目:asp.Net 来源:互联网
导读:针对当前的RC2 – 生成的模板Razor视图包括: @{ ViewBag.Title = Details1; Layout = /Views/Shared/_Public.cshtml;} 在ViewBag.Title下有一个红色的波形,这个编译器的错误: Error 4 One or more types required to compile a dyna
|
针对当前的RC2 – 生成的模板Razor视图包括: @{
ViewBag.Title = "Details1";
Layout = "/Views/Shared/_Public.cshtml";
}
在ViewBag.Title下有一个红色的波形,这个编译器的错误: Error 4 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? c:Visual Studio 2010ProjectsmyProjViewsWebinarDetails1.cshtml 6 2 TTSTrain.Webinars.WebEntry 但项目的建立和运行正常。错误是否表明应该解决的其他问题? 解决方法我从< compilation>中删除了targetFramework属性后遇到了同样的问题。元素在Web.config文件中。一旦我恢复了 <compilation debug="true" targetFramework="4.0"> 一切都好运了! (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
