Copied to clipboard

Flag this post as spam?

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


  • Dibs 202 posts 991 karma points
    Jun 08, 2021 @ 14:54
    Dibs
    0

    Umbraco 9 Modelbuilder

    Hi Umbraco Team

    I got ModelsBuilder generating models using "ModelMode": "LiveAppData" in appsettings.development.json and commenting out <Compile Remove="umbraco\models\**" from the .csproj file. This was a few weeks back on a Umbraco 9 hackathon, some of you may have been on it I was trying to replicate this but cant get it to build models. I have noticed the .csproj files dosn't have the <Compile Remove="umbraco\models\**" line anymore. Also, the "LiveAppData" no longer is used and i have changed this to "SourceCodeAuto". Anyone got Modelsbuilder building models in a custom path recently?

    Dibs

  • Benjamin Carleski 33 posts 294 karma points MVP c-trib
    Jun 08, 2021 @ 15:47
    Benjamin Carleski
    0

    I have gotten it working. If you want to take a look at my appSettings file, you can see it at https://github.com/ProworksDevTeam/CG2021-HeadlessUnicore-Backend/blob/master/appsettings.Development.json#L35

  • Dibs 202 posts 991 karma points
    Jun 09, 2021 @ 11:38
    Dibs
    101

    Hi Benjamin

    Thanks for reply

    this is what fixed my issue

    "ModelsBuilder": {
            "ModelsDirectory": "~/models-builder/generated",
            "Enable": true,
            "ModelsMode": "SourceCodeAuto"
          },
    
  • David Armitage 510 posts 2082 karma points
    Jun 10, 2021 @ 11:02
  • andrew shearer 513 posts 663 karma points
    Jun 14, 2021 @ 22:37
    andrew shearer
    0

    hopefully this makes it to the umbraco docs soon :)

  • 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