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

    Auto generate PublishedContentModels on build


    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 5876 posts 22449 karma points MVP 4x admin c-trib
    Apr 20, 2017 @ 21:47
    Alex Skrypnyk

    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.



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

    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: