Load generated models into backoffice (13.6.0)
j
Hi. I have generated models in umbraco/models directory that I have got from a different git branch. But when I build and run my project, they do not appear in my backoffice (settings / document types). This is my appsettings: "Umbraco": { "CMS": { "ModelsBuilder": { "ModelsMode": "SourceCodeAuto", "ModelsDirectory": "~/umbraco/models", "AcceptUnsafeModelsDirectory": true }, ... What am I missing?
m
Hi, Models builder works the otherway, it reads from Umbraco and generates the cs files. If you want to take models and data from another project Id recommend using uSync and its files to do so
j
ok, thanks
So, if I create a project in my development environment and then want to launch it in a stage or production environment, I have to use uSync to create all document types etc? Or do it manually all over again? I feel it is a bit strange that Umbraco does not have tools for this (since uSync is third party).
r
If you want to pay for & host on Umbraco Cloud then you can deploy doc types / content etc. with that, that product is called Umbraco Deploy. Otherwise, uSync (free) does this superbly well and is very widely used and can be used with any hosting. You certainly don’t have to recreate all your doc types manually!
l
Umbraco Cloud uses Umbraco Deploy, which you can also license for on-premise installations. Its (too) expensive IMHO though, so you're better off with uSync free. If you like it, you can also get paid versions of uSync with additional features.
j
Thanks. Makes sense.