Reputation: 148
i'm trying to build an umbraco 8 website using visual studio 2017 it give me this error The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Web.PublishedModels' (are you missing an assembly reference?) when I'm trying to open the pages and when I publish it , it give me error in w3wp.exe
is there any solution for it ?
Upvotes: 1
Views: 323
Reputation: 246
This error is occurring because you are using PureLive Models Builder Mode with Visual Studio. To get around this, the best thing to do is switch to a different mode, something link Dll mode.
You can change the mode in the app settings section of the web.config file like this:
<add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
Then with this Dll mode in place, models are not generated automatically anymore, and your site will probably immediately crash, because the model types do not exist. Models need to be generated explicitly by clicking 'Save and Generate' instead of 'Save' in the content type editor, or by clicking 'Generate' in the Models Builder dashboard (in the developers section)
Then when models are generated, it will create a new dll in the bin folder containing the models.
See here for more details about this:
https://www.zpqrtbnk.net/posts/beyond-purelive
Kind regards
Paul
Upvotes: 1