'PublishedContentModels' does not exist in the namespace 'Umbraco.Web'
Umbraco 7.3.5 installed via NuGet VS 2015
Umbraco backend working but unable to load frontend pages.
Getting following Error :
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'PublishedContentModels' does not exist in the namespace 'Umbraco.Web' (are you missing an assembly reference?)
Error From log :
ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.Web.HttpCompileException (0x80004005): c:\Users\Mayank\AppData\Local\Temp\Temporary ASP.NET Files\vs\e37dfa4f\78bad723\AppWebroot.cshtml.65a2d1ee.uocj3x7m.0.cs(34): error CS0234: The type or namespace name 'PublishedContentModels' does not exist in the namespace 'Umbraco.Web' (are you missing an assembly reference?)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath)
at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType(String virtualPath)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.<>cDisplayClass2b.
This type of issue is linked with model builder but 7.3.5 should not have model builder with it .
Is this a fresh install or an existing implementation ?
I'm wondering how the view (App_Web_root.cshtml) has gotten a reference to using Umbraco.Web.PublishedContentModels ?
If the site isn't meant to work with ModelsBuilder or Zbu Models builder package for pre 7.4.x I'd remove any using statements that reference Umbraco.Web.PublishedContentModels...
and then I'd delete the contents of the folder 78bad723 from your Temporary ASP Files
c:\Users\Mayank\AppData\Local\Temp\Temporary ASP.NET Files\vs\e37dfa4f\78bad723
The .dll is made by the models builder in Umbraco. The models builder will convert your document types into strongly typed models for you to use in your application. If the Umbraco.ModelsBuilder.ModelsMode setting in your web.config is set to dll or LiveDll, the PublishedContentModels.dll will appear in your bin directory.
'PublishedContentModels' does not exist in the namespace 'Umbraco.Web'
Umbraco 7.3.5 installed via NuGet VS 2015
Umbraco backend working but unable to load frontend pages.
Getting following Error :
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'PublishedContentModels' does not exist in the namespace 'Umbraco.Web' (are you missing an assembly reference?)
Error From log :
ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred System.Web.HttpCompileException (0x80004005): c:\Users\Mayank\AppData\Local\Temp\Temporary ASP.NET Files\vs\e37dfa4f\78bad723\AppWebroot.cshtml.65a2d1ee.uocj3x7m.0.cs(34): error CS0234: The type or namespace name 'PublishedContentModels' does not exist in the namespace 'Umbraco.Web' (are you missing an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType(String virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.<>cDisplayClass2b.This type of issue is linked with model builder but 7.3.5 should not have model builder with it .
Solution Needed
Thanks !
Hi Mayank
Is this a fresh install or an existing implementation ?
I'm wondering how the view (
App_Web_root.cshtml
) has gotten a reference to using Umbraco.Web.PublishedContentModels ?If the site isn't meant to work with ModelsBuilder or Zbu Models builder package for pre 7.4.x I'd remove any using statements that reference Umbraco.Web.PublishedContentModels...
and then I'd delete the contents of the folder 78bad723 from your Temporary ASP Files
c:\Users\Mayank\AppData\Local\Temp\Temporary ASP.NET Files\vs\e37dfa4f\78bad723
to make sure they are freshly generated...
.. see if the error returns after rebuilding.
regards
Marc
This could be due to ~/Views/web.config having a reference to the namespace (I believe it is in there by default):
Does someone can explain why I need a Umbraco.Web.PublishedContentModels.dll in my bin directory, and so why it is not part of Umbraco releases?
The .dll is made by the models builder in Umbraco. The models builder will convert your document types into strongly typed models for you to use in your application. If the Umbraco.ModelsBuilder.ModelsMode setting in your web.config is set to dll or LiveDll, the PublishedContentModels.dll will appear in your bin directory.
Read more about the models builder here: https://our.umbraco.com/documentation/reference/templating/modelsbuilder/
is working on a reply...