Joachim Velzel
Joachim Velzel

Reputation: 656

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've been stuck on this for a while, any help would be appreciated.

Thanks very much!

Upvotes: 1

Views: 5781

Answers (2)

Ayo Adesina
Ayo Adesina

Reputation: 2395

If you are trying to upgrade from v7.3.6 to v7.14.0. you will probably find more problems than just not being able to find that namespace.

The namespace Umbraco.Web.PublishedContentModels is a reference to the models that are generated by Umbraco when the Models Builder is enabled. However in version 7.3.6 this feature did not exist.

I recommend that you first use the Compare Releases` tool on the umbraco website. This will tell you exactly what changes (including breaking changes) that have happened between each version and give you specific instructions of what to look for when upgrading.

Another way I have done it in the past is upgrading version by version, that way you can isolate which version may be causing the problem.

Upvotes: 0

Joachim Velzel
Joachim Velzel

Reputation: 656

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.

Upvotes: 4

Related Questions