Copied to clipboard

Flag this post as spam?

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


  • Edgar Rasquin 143 posts 424 karma points
    Jul 10, 2020 @ 16:29
    Edgar Rasquin
    0

    Models Builder "AppData" Mode - type or namespace name ... does not exist in the namespace 'Umbraco.Web.PublishedModels' - error

    Hi,

    I just started my first v8 website. I did a clean install v8.6.3 with the starter kit installed.

    Since I am developing in visual studio I tried switching to Model Builder "AppData" Mode:

    enter image description here

    As soon as I start the site I get this error:

    Line 42:     public class _Page_Views_home_cshtml : Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Home> {
    

    In the backend I generated the Models using the Models Builder 8.6.3: enter image description here

    That generates the .cs files in App_Data > Models: enter image description here

    But in VS I still get the error:

    The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Web.PublishedModels'
    

    Trying to get to the homepage I get the equivalent error screen: enter image description here

    When I switch back to Models Builder "PureLive" mode, the page works fine.

    What am I doing wrong?

    Thanks so much!

  • Edgar Rasquin 143 posts 424 karma points
    Jul 13, 2020 @ 08:44
    Edgar Rasquin
    1

    My mistake.

    By accident I created in VS a ASP.NET Webapp Project in Visual Basic instead of c#

    Created the correct c# app and everything works as expected.

  • Richard Hamilton 36 posts 157 karma points
    Oct 10, 2020 @ 12:48
    Richard Hamilton
    0

    Errgh! I can't believe I have exactly the same problem. Been pulling my hair out, seen this post and I also have installed a vb.net project!

    I think its the default in VS2019!

Please Sign in or register to post replies

Write your reply to:

Draft