2012-04-11 11 views
5

Tengo un nuevo proyecto creado con MvcContrib y MvcScaffold. Todo funciona bien con la compilación dinámica. Sin embargo, cuando enciendo la compilación de vista en el archivo de proyecto, la compilación se rompe.Building Razor with MvcBuildViews = verdadero error

The name 'model' does not exist in the current context 
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'LabelFor' and no extension method 'LabelFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'EditorFor' and no extension method 'EditorFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'ValidationMessageFor' and no extension method 'ValidationMessageFor' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) 

Es el mismo tipo de errores que recibiría si left out the web.config file from the Views folder, pero que está presente. También tengo Phil Haack's fix ya, inútilmente. ¿Por qué MSBuild no encuentra las golosinas de MVC3?

+0

Podría ser un poco tarde, pero ¿vio http://stackoverflow.com/q/4725387/195550? –

Respuesta

1

Descubrí que había duplicado accidentalmente la sección system.web en mi archivo de configuración que causó el mismo error.

Cuestiones relacionadas