Copied to clipboard

Flag this post as spam?

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


  • Joachim Velzel 3 posts 93 karma points
    Apr 02, 2019 @ 23:32
    Joachim Velzel
    0

    Can't find Umbraco.Web.PublishedModels Namespace

    Hello,

    I'm new to Umbraco development.

    My job is to upgrade from v7.3.6 to v7.14.0.

    The Umbraco.Web.PublishedModels seems to be declared in umbraco/views/web.config.

    enter image description here

    However, Roslyn, the compiler seems to be throwing this error:

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

    enter image description here

    We have never used the modelsbuilder in our Umbraco system. My goal is just to get this working for now, so that we can be ready to migrate to v8 in the future.

    Would this have something to do with the Temporary ASP.NET Files?

    • I have reinstalled umbracoCMS + modelsbuilder a few times.
    • I have updated to the latest asp.net.mvc
    • I have updated to the latest microsoft.net.Compilers

    I've been stuck on this for a while, any help would be appreciated.

    Thanks very much!

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Apr 03, 2019 @ 09:34
    Alex Skrypnyk
    0

    Hi

    Did you try to rebuild Models Builder models?

    What "Umbraco.ModelsBuilder.ModelsMode" do you use? Go to web.config and check this setting:

    Thanks, Alex

  • Florian 7 posts 109 karma points
    Apr 03, 2019 @ 13:32
    Florian
    1

    Do you use Model Builder in AppData mode? If yes I had a similar error.

    My solution was here:

    https://our.umbraco.com/forum/umbraco-cloud/82156-models-builder-with-umbraco-cloud#comment-281518

    You have to configure the output dir under App_Code\Models for the created models, otherwise VS does not find them.

  • Joachim Velzel 3 posts 93 karma points
    Apr 03, 2019 @ 20:21
    Joachim Velzel
    100

    Resolved!

    Thanks Florian for pointing me in the right direction!

    Using the guide install guide(here), I found that I needed to change the views/web.config namespace Umbraco.Web.PublishedModels to Umbraco.Web.PublishedContentModels as this is how it is defined elsewhere.

    Thanks guys for helping out, Let me know if more explanation is needed.

Please Sign in or register to post replies

Write your reply to:

Draft