I assume this is where the namespace would be and where Home is defined. However, I'm not finding the Models folder in my AppData folder. Is there are reason the model files would fail to generate?
If so, you need to manually generate the models by going into the Developer section, click on the Models Builder tab, and hit the red "Generate models" button.
This should cause Umbraco to create the Home.cs file and add it to your AppData folder.
Note you'll also want to include that new file into your solution and build before running the website on the frontend again.
In future if you make further changes to the document type, or add new ones, you'll want to Generate models again, include any new files, and rebuild.
all.generate.cs and models.generate.cs failing to generate
Hello,
I'm getting this strange error here:
It's telling me it can't find 'Home' in the namespace 'Umbraco.Web.PublishedContentModels'.
I did a search in my project for all instances of PublishContentModels. I found a lot of references to it but no definition.
Usually, the project consists of a couple files in which all the models are defined:
.../AppData/Models/all.generated.cs .../AppData/Models/models.generated.cs
I assume this is where the namespace would be and where Home is defined. However, I'm not finding the Models folder in my AppData folder. Is there are reason the model files would fail to generate?
Hi Gibran,
Are you using the
AppData
mode for Models Builder? Do you have this key value in your web.config:If so, you need to manually generate the models by going into the Developer section, click on the Models Builder tab, and hit the red "Generate models" button.
This should cause Umbraco to create the Home.cs file and add it to your AppData folder.
Note you'll also want to include that new file into your solution and build before running the website on the frontend again.
In future if you make further changes to the document type, or add new ones, you'll want to Generate models again, include any new files, and rebuild.
Hope this helps,
Chris
is working on a reply...