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
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:
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.
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,
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
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
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.
is working on a reply...