Models not being built
# help-with-umbraco
a
Hi! I'm facing an issue where it seems models are not being built in my production environment. I have tried using modelsbuilder mode SourceCodeAuto and -Manual. Even if I manually hit the build models button in the backoffice, I get an error stating that the model does not exist: "'Home' does not contain a definition for 'HeroImage' and no accessible extension method 'HeroImage' accepting a first argument of type 'Home' could be found (are you missing a using directive or an assembly reference?)". This works fine locally, but not in my azure production. Any suggestions how I can solve this? :/ Using umbraco 12.
I have verified that the document type "Home" does indeed have the property 'heroImage' in the backoffice of the production environment 🤔
j
Models shouldn't be built in the production environment, and instead be built locally, committed and deployed to live. There is a good chance that if you have the RuntimeMode set it prevents you from building them
a
Aha! I will do that instead then. Thank you 🙂
j
It's mainly because views will need to be updated along with the models, so really not something that should ever be done directly on live 🙂
a
Ok, good to know. First time for me not only handling the frontend part of Umbraco 😛
2 Views