Copied to clipboard

Flag this post as spam?

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


  • Aron Green Kjærgaard 2 posts 72 karma points c-trib
    Oct 24, 2016 @ 09:57
    Aron Green Kjærgaard
    0

    ModelsBuilder automatic models generation

    Hi all,

    I am building a small project using ModelsBuilder and so far it's great.

    Except i have to generate models every build. Is there a way to automate this?

    In my web.config I have the following setup in regards to ModelsBuilder:

    <add key="Umbraco.ModelsBuilder.Enable" value="true" />
    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
    

    When I rebuild and try to load the page i get the following error: ModelsBuilder error message

    I think it is pretty inconvenient to have to keep track of the ModelsBuilder this way .

    Any suggestions?

    Thanks in advance
    Aron

  • Alex Skrypnyk 6162 posts 24132 karma points MVP 8x admin c-trib
    Oct 24, 2016 @ 10:46
    Alex Skrypnyk
    0

    Hi Aron,

    This situation can be in 2 cases:

    1) you have view, but doctype "Site" was deleted

    2) you have to generate dll for ModelsBuilder again

    Try to check "Site" doctype and rebuild site and back to this topic with result.

    Thanks,

    Alex

  • Aron Green Kjærgaard 2 posts 72 karma points c-trib
    Oct 24, 2016 @ 11:11
    Aron Green Kjærgaard
    0

    Hi Alex,

    Thank you for your reply.

    Both Doctype and View are still there.

    When i rebuild i get the error like above.

    When i go to Developer -> Models Builder and click Generate models, the site is back and working as intended.

    Is this intentional in ModelsBuilder?
    Or am i experiencing a bug or possibly some bad code/practice on my part?

  • Max 80 posts 437 karma points
    Oct 24, 2016 @ 13:22
    Max
    0

    I'm getting the same build error after updating to 7.5.4. (Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1085.0)

    I'm using pureLive not DLL. I was not experiencing this issue before I ran the update. I attempted regress Umbraco and I still have the error.

    When I go to Model Builder I see: enter image description here

  • Max 80 posts 437 karma points
    Oct 25, 2016 @ 14:34
    Max
    0

    This appeared to be an issue with my VS project. After several reinstall attempts from NuGet it finally resolved.

    One of the steps I took was to regress the C# target version to 4.5.2, pull a fresh install from NuGet (7.5.4)

    Then I reset the C# Target to 4.6.x, not exactly sure if that was the fix but it seems to be working properly now.

Please Sign in or register to post replies

Write your reply to:

Draft