Skip to content

VS Extension: Method not found: 'System.String Umbraco.ModelsBuilder.Building.Compiler.CreateValidIdentifier(System.String)' #238

Description

@hfloyd

I have been happily using the CustomTool version for years, but today decided to get with the program and install the newer VS Extension. When I ran "Build Models..." I get a dialog mentioning a failure and the output window says:

UmbracoModelsBuilder: Starting v8.1.1 7/20/2020 4:42:06 PM.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: MissingMethodException: Method not found: 'System.String Umbraco.ModelsBuilder.Building.Compiler.CreateValidIdentifier(System.String)'.
UmbracoModelsBuilder:    at ZpqrtBnk.ModelsBuilder.Extension.Generator.GetNameSpace(String path)
   at ZpqrtBnk.ModelsBuilder.Extension.Generator.TryGenerate(ProjectItem sourceItem)
   at ZpqrtBnk.ModelsBuilder.Extension.Generator.Generate(AsyncPackage package, ProjectItem sourceItem)

This is my models folder structure:
image

The "ContentTypes" folder is not included in any project namespaces - it is just to separate "Umbraco Content Type-based" models from any other custom models needed.

My "_ModelBuilderConfig.cs" file includes an explicit namespace:

using Umbraco.ModelsBuilder;
[assembly: ModelsNamespace("MySite.Models")]

Perhaps this is related to this other issue: #228 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions