Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Schiffhauer 1 post 71 karma points
    Feb 03, 2019 @ 18:20
    Chris Schiffhauer
    0

    Failed to build PureLive models

    I'm trying out a new installation of Umbraco 8. I set up permissions on the server to allow appropriate read/write access under App_Data, etc. I created a new document type and template, but when I try to create a content page and view it I get this 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 'Cast' does not exist in the namespace 'Umbraco.Web.PublishedModels' (are you missing an assembly reference?)

    Source Error:

    Line 40: Line 41: Line 42: public class PageViewsCastcshtml : Umbraco.Web.Mvc.UmbracoViewPage

    Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\0c58d9c0\c2b4c2fb\AppWebcast.cshtml.65a2d1ee.zls7h5rc.0.cs Line: 42

    Likewise, in the Models Builder dashboard, I see this status:

    Last generation failed with the following error:

    Failed to build PureLive models.

    Could not load type 'Umbraco.Core.Services.IContentTypeServiceBase`1' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.

    at Umbraco.ModelsBuilder.Umbraco.UmbracoServices.GetAllTypes()

    at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.GetModelsAssembly(Boolean forceRebuild) in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\PureLiveModelFactory.cs:line 323

    at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.EnsureModels() in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\PureLiveModelFactory.cs:line 270

    The App_Data\Models folder on the server only contains the models.err and ood.flag files, with no *.cs files at all.

    Can anyone help me figure out how to get the PureLive models to build?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Feb 04, 2019 @ 16:00
    Alex Skrypnyk
    0

    Hi Chris

    With PureLive models, models are generated and compiled on the fly, in memory, at runtime. They are available in views exclusively. This is for people who exclusively use the Umbraco backoffice, and probably do not write custom code such as controllers anyway. Whenever a content type is modified, models are updated without restarting Umbraco (in the same way .cshtml views are recompiled).

    Read more - https://our.umbraco.com/documentation/reference/templating/modelsbuilder/Builder-Modes

    Try to use Dll mode for development locally

    Thanks,

    Alex

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Feb 25, 2019 @ 16:17
    Alex Skrypnyk
    0

    Hi Chris

    Did you find a solution for this topic? Can you share with our community?

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft