Search code examples
asp.net-mvcumbracoumbraco7

Can't find Umbraco.Web.PublishedModels Namespace


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!


Solution

  • Using the ModelsBuilder install guide (here)

    I needed to change the namespace in views/web.config from Umbraco.Web.PublishedModels to Umbraco.Web.PublishedContentModels as this is how it is defined elsewhere.