Copied to clipboard

Flag this post as spam?

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


  • Marcus Maunula 229 posts 386 karma points
    Nov 04, 2020 @ 03:30
    Marcus Maunula
    0

    My models just wont show up

    I have tried all versions from 8.7 to 8.9 and somehow my models have ended up in some twilight zone.

    I am using LiveAppData as I have so many times before. Everything compiles but it is like they don't exist.

    This has worked since v7 without issues for me. What happened?enter 
![enter image description here

  • Marc Goodson 2155 posts 14409 karma points MVP 9x c-trib
    Nov 04, 2020 @ 07:04
    Marc Goodson
    100

    Hi Marcus

    What is the namespace that your Models are being generated in?

    And do you have this namespace listed in the Views/web.config ffile so Views know how to resolve any Models referenced in the view.

    eg

      <add namespace="Umbraco.Web.PublishedContentModels" />   
    

    If you have the correct namespace reference in the Views/web.config - then I've had this kind of issue with earlier VS2015 where I had to close Visual Studio down, and open it again before intellisense decided to find the generated Models... and I think on another occaision I had build error that prevented the intellisense from being updated.

    regards

    Marc

  • Marcus Maunula 229 posts 386 karma points
    Nov 04, 2020 @ 07:06
    Marcus Maunula
    0

    Same as usual. Everything compiles. Something is strange. I have tried several versions from 8.7 in totally new projects. Same result. This never happened before.

    Umbraco.Web.PublishedModels

    And yes it is in webconfig.

    <add namespace="Umbraco.Web.PublishedModels" />
    

    This has worked fine until I went from 8.6 to 8.9 (also tried the versions inbetween)

  • Marcus Maunula 229 posts 386 karma points
    Nov 04, 2020 @ 13:19
    Marcus Maunula
    0

    My bad. It was some weird bug in my VS2019 pro. Turned out it was using VB. Never had that happen before.

  • Marc Goodson 2155 posts 14409 karma points MVP 9x c-trib
    Nov 04, 2020 @ 14:49
    Marc Goodson
    1

    oh I think I've done that once before too!

  • Marcus Maunula 229 posts 386 karma points
    Nov 04, 2020 @ 19:14
    Marcus Maunula
    0

    It was just so inexplicable :).

Please Sign in or register to post replies

Write your reply to:

Draft