Copied to clipboard

Flag this post as spam?

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


  • Greg Fyans 140 posts 342 karma points
    Dec 14, 2020 @ 09:43
    Greg Fyans
    0

    Tell ModelsBuilder not to generate models for certain doctypes

    Is it possible, either via an option or extending the API, to instruct ModelsBuilder not to generate models for certain DocTypes?

    We have a Base Build package that we install in our projects, that comes with:

    1. 50-or-so doctypes
    2. The generated models compiled into a separate assembly for these doctypes

    We don't want ModelsBuilder to generate the models again for these doctypes, we want it to just ignore them and only generate models for new doctypes.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Dec 14, 2020 @ 13:25
    David Brendel
    100

    Hi Greg,

    there is some configuration you can do in code that prevents ModelsBuilder from generating models for specific content types.

    [assembly:IgnoreContentType("alias")]

    You need a file and add these statements for all that you want to ignore. See documentation here: https://github.com/modelsbuilder/ModelsBuilder.Original/wiki/ModelsGenerationConfiguration

    Not sure if the Embedded version of ModelsBuilder recognizes the configuration, so you may have to upgrade to the full version.

    Regards David

  • Greg Fyans 140 posts 342 karma points
    Dec 14, 2020 @ 13:52
    Greg Fyans
    0

    Perfect, thank you.

Please Sign in or register to post replies

Write your reply to:

Draft