Search code examples
c#visual-studioumbraco

Umbraco deletes models after adding new document type


Whenever I create a new document type in Umbraco and stops my server it deletes all of the generated models.

I read the documentation and it is properly because I have the following value set in my web.config

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

Right now I am kind of stuck because I can't start my project up again without it telling me that all of the models are missing.

So my question is how can I generate the models manually? or is that something i am missing?


Solution

  • If you change your Builder Mode to Dll, you can trigger a manual rebuild of the models from the Developer section in Umbraco.

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