Copied to clipboard

Flag this post as spam?

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


  • Jannik Larsen 4 posts 74 karma points
    Apr 20, 2017 @ 08:38
    Jannik Larsen
    0

    Auto generate PublishedContentModels on build

    Hello

    I am currently building a website, which uses controllers to manage the views. Now when I've done this, and changed the ModelsMode to LiveDll in the web.Config, it still does not generate the DLL's for the views automatically. This means I manually have to go to every document type and click 'Save' to generate the views.

    Is it possible to generate these automatically, so I do not have this manual process? We deploy our site several times a day, and if we have to do this everytime, we might aswell hire a guy to do that only :-P

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Apr 20, 2017 @ 21:47
    Alex Skrypnyk
    0

    Hi Jannik

    It's strange because 'LiveDll' generates models in a Dll in ~/bin anytime a content type changes.

    What did you mean click 'Save' to generate the views?

    Try 'PureLive' mode, it generates models in a dynamic in-memory assembly and does not need to press save button.

    Thanks,

    Alex

  • Stephen 767 posts 2273 karma points c-trib
    Apr 21, 2017 @ 15:21
    Stephen
    1

    The ModelsBuilder does not generate "views" but the models DLL, and there's only one for all models. With LiveDll... that DLL should be automatically rebuilt anytime you modify a content type, and then it's in ~/bin and remains there. With Dll you would have to press a button to generate the DLL but again once there, it stays there.

    Not exactly sure what you mean by "click save to generate the views" - can you elaborate?

Please Sign in or register to post replies

Write your reply to:

Draft