Copied to clipboard

Flag this post as spam?

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


  • Jesper 6 posts 76 karma points
    Sep 15, 2016 @ 12:50
    Jesper
    0

    Avoid creating Umbraco.Web.PublishedContentModels.dll

    Hi!

    Fairly new to ModelsBuilder, so forgive me if its a stupid question.

    How do I avoid getting Umbraco.Web.PublishedContentModels.dll build?

    I am currently using :

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

    because I want the models-classes built in the App_Data/Models-folder.

    I do not want the Umbraco.Web.PublishedContentModels.dll build, since the models are included in my WebProject .dll when it is built.

    Best regards Jesper

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Sep 15, 2016 @ 13:05
    Michaël Vanbrabandt
    0

    Hi Jesper,

    If you want to use general model classes instead of a dll you should edit your web config to the following:

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

    The value AppData makes sure that all of your models will be generated into the App_Data/Models folder.

    After you have edit the web config re run your application, go to the developer section and then at the top menu you will find the Models Builder tab where you can generate the models.

    After that you can include your model classes in your solution and use them.

    Hope this helps!

    /Michaël

  • Jesper 6 posts 76 karma points
    Sep 16, 2016 @ 05:21
    Jesper
    0

    Thank you - I'll give it a shot :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies