Copied to clipboard

Flag this post as spam?

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


  • Mahmoud 2 posts 72 karma points notactivated
    Apr 24, 2021 @ 19:42
    Mahmoud
    0

    Failed to build models. After upgrading from version 8.0.1 to 8.12.1

    Hello Everyone,

    After upgrading Umbraco from version version 8.0.1 to 8.12.1, we tried to regenerate the Models, but unfortunately we received the below error,

    Failed to build models. Method not found: 'Umbraco.Core.Models.PublishedContent.PublishedContentType Umbraco.Core.Models.PublishedContent.IPublishedContentTypeFactory.CreateContentType(Umbraco.Core.Models.IContentTypeComposition)'.

    at Umbraco.ModelsBuilder.Umbraco.UmbracoServices.GetTypes(PublishedItemType itemType, IContentTypeComposition[] contentTypes) at Umbraco.ModelsBuilder.Umbraco.UmbracoServices.GetAllTypes() in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\UmbracoServices.cs:line 39 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.GenerateModels(UmbracoServices umbracoServices, String modelsDirectory, String bin, String modelsNamespace) in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 121 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.BuildModels() in D:\d\Zbu ModelsBuilder\src\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 62

    Could anyone please advise regarding the above error

  • Marc Goodson 2157 posts 14432 karma points MVP 9x c-trib
    Apr 25, 2021 @ 07:11
    Marc Goodson
    0

    Hi Mahmoud

    One thought, here is that the 'Modelsbuilder' functionality was a separate library bundled with the first versions of Umbraco v8 under the namespace of Umbraco.Modelsbuilder (as reported in your error) - but in later versions of V8, this functionality was split into two.

    Umbraco.Modelsbuilder.Embedded

    A simpler version of Modelsbuilder for less complex scenarios

    and

    Our.Modelsbuilder

    Containing extra functionality, like the original, eg API Models generation:

    https://github.com/modelsbuilder/ModelsBuilder.Original/blob/e3b416110100aefab42f1a32c6a5cd08a2338a6e/build/Nuspecs/Our.ModelsBuilder.Web.nuspec

    So it may be possible that you have an 'old' dll still in your bin folder? eg Umbraco.Modelsbuilder.dll that is causing your error?

    If you have simple model generation requirements you should be able to remove this, and use the embedded version to generate your models, but if you use the custom VS extension to generate models you'll want to install the latest version of the Our.Modelsbuilder community package.

    hopefully! :-)

    regards

    Marc

  • Mahmoud 2 posts 72 karma points notactivated
    Apr 25, 2021 @ 17:34
    Mahmoud
    0

    Hi Marc,

    I browsed Bin folder, and turned out that Umbraco.ModelsBuilder.dll is still there after the upgrade, I removed the dll and things seemed to be working fine,

    Many Thanks for you help.

Please Sign in or register to post replies

Write your reply to:

Draft