I have enabled the models builder, ModelsMode = SourceCodeAuto.
Currently I have created a Document type named as Home and published a page named as Home as well.
However, I got the below message when I view my page.
The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Cms.Web.Common.PublishedModels' (are you missing an assembly reference?)
Here is how I call the model.
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
Assuming you see the source code file, try rebuilding your project after you generated the model class. You may also need to restart your website instance so it can get the updates.
Umbraco 9 - Unable render view with model
Hi,
I have enabled the models builder, ModelsMode = SourceCodeAuto.
Currently I have created a Document type named as Home and published a page named as Home as well.
However, I got the below message when I view my page. The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Cms.Web.Common.PublishedModels' (are you missing an assembly reference?)
Here is how I call the model. @using Umbraco.Cms.Web.Common.PublishedModels; @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
Assuming you see the source code file, try rebuilding your project after you generated the model class. You may also need to restart your website instance so it can get the updates.
That always trips me up.
Hi Kevin,
Yes, it works after I rebuild my project.
Thanks!
is working on a reply...