Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ABDELILAH NAIMI 4 posts 74 karma points
    Dec 09, 2021 @ 21:03
    ABDELILAH NAIMI
    0

    Compilation Error , type or namespace name 'Home' does not exist in the namespace

    Hi all, I am facing an issue like below when deploy the application on Godaddy

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0234: The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Web.PublishedModels' (are you missing an assembly reference?)

    Source Error:

    Line 46:
    Line 47:
    Line 48: public class PageViewsHomecshtml : Umbraco.Web.Mvc.UmbracoViewPage

    Source File: c:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\66378274\a31a29bb\AppWebhome.cshtml.65a2d1ee.coyd4wmt.0.cs Line: 48 Thanks for your help

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Dec 11, 2021 @ 08:33
    Marc Goodson
    0

    Hi Abedlilah

    What mode are you running Modelsbuilder in?

    Everytime you create a DocumentType, the Modelsbuilder tool generates a c# class to match, to be used in code and views, it's what enables you to write

    @Model.PageTitle instead of @Model.Value

    Your error is saying that the Modelsbuilder Model called 'Home' that must I think match a DocumentType called Home on your site, isn't there after FTPing...

    If you go to the backoffice of the site, and go to the settings section and find the Modelsbuilder tab, it should tell you which mode you are running in

    https://our.umbraco.com/Documentation/Reference/Templating/Modelsbuilder/Builder-Modes-v8_5

    or you can see the settings in the web.config file appsettings section

    All you may need to do is press a button on the Modelsbuilder dashboard to regenerate your models in the new environment.

    Or you might be using a modelsbuilder setting that generates the files into the appdata folder, and you need to include them in your visual studio solution, to 'build' them into your site dll, so they are included when you FTP to your hosting environment.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft