Copied to clipboard

Flag this post as spam?

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


  • Shada 55 posts 137 karma points
    Feb 24, 2016 @ 15:50
    Shada
    1

    Could not load "Umbraco.ModelsBuilder" in Web Api

    After update Umbraco to 7.4.1 my Web API is not work.

    I have a website in IIS. I deployed my Web API to this folder and am trying to run it (mysiteaddress/api). And now I get this error:

    Could not load file or assembly "Umbraco.ModelsBuilder" or one of its dependencies. The system cannot find the file specified

    Section

    <modules>
      <remove name="ImageProcessorModule" />
      <remove name="ClientDependencyModule" />
      <remove name="UrlRewriteModule" />
      <remove name="UmbracoModule" />
      <remove name="MediaProtectModule" />
      <!--this (UrlRoutingModule-4.0 remove/add) is needed to be able to run on iis 7-->
      <remove name="UrlRoutingModule-4.0" />
      <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
    </modules>
    
  • Andy 10 posts 81 karma points
    Feb 24, 2016 @ 16:41
    Andy
    0

    Could try reinstalling it again via Nuget.

    https://www.nuget.org/packages/Zbu.ModelsBuilder/2.1.3

    This should sort out your references.

  • Andy 10 posts 81 karma points
    Feb 24, 2016 @ 16:46
    Andy
    0

    Sorry ignore the previous post this is the wrong ModelBuilder; how if you try to update the UmbracoCms package via nuget it should sort it...

    Update-Package -Reinstall UmbracoCms

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 24, 2016 @ 18:02
    Craig100
    0

    I have a new 7.4.1 site with a couple of docTypes defined. I have the ZPQRT Models Builder extension in VS2015.

    I have

    <add key="Umbraco.ModelsBuilder.Enable" value="true" />
    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
    

    I know I have to include the App_Data/Models directory in the project.

    What else is needed as the ModelsBuilder UI is saying:-

    ModelsBuilder is enabled, with the following configuration:
    The models factory is enabled.
    The API is neither installed nor enabled.
    External tools such as Visual Studio cannot use the API.
    Dll models are enabled.
    Models namespace is Umbraco.Web.PublishedContentModels.
    Static mixin getters are enabled. The pattern for getters is "Get{0}".
    Tracking of out-of-date models is enabled.
    

    I feel I'm very close but no banana (yet) ;)

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 25, 2016 @ 00:59
    Craig100
    2

    The banana was obtained by installing Umbraco.ModelsBuilder.Api via Nuget. Thought this was part of the Umbraco install, but apparently not.

    Happy now :)

  • Shada 55 posts 137 karma points
    Feb 25, 2016 @ 07:59
    Shada
    0

    The problem was solved adding in Web Api web.config:

      <assemblies>
        <remove assembly="Umbraco.ModelsBuilder" />
       </assemblies>
    
  • Gordon 15 posts 96 karma points
    Mar 27, 2017 @ 10:33
    Gordon
    0

    Hi Craig,

    Do you know if your fix of installing Umbraco.ModelsBuilder.Api via Nuget will work for 7.5.9? Is it the same ModelBuilder do you know?

    My 7.5.9 install has just died because of this error "Could not load file or assembly 'Umbraco.ModelsBuilder' or one of its dependencies. The system cannot find the file specified."

    I can't even login to CMS now.

    Thanks

  • Craig100 1136 posts 2523 karma points c-trib
    Mar 27, 2017 @ 12:03
    Craig100
    0

    Hi Gordon,

    I'm currently developing on 7.5.11 and using LiveAppData as the ModelsBuilder mode. So I'm generating models in the Developer section, adding any new App_Data/Models to my VS project then building. Seems to work fine. Sorry I can't be more help with the ModelsBuilder API but I seem to have a workflow that works now without it.

  • Gordon 15 posts 96 karma points
    Mar 27, 2017 @ 12:33
    Gordon
    0

    In a round about way, I've just discovered that new models were being generated with a Build property of 'Compile'. I changed the setting to 'Resource' (like the earlier generated models) and it all worked again - I could build the solution.

    Not sure why this happened, but I'll consider your approach next time.

    Thanks for your quick reply and useful info :o)

  • Daniel Conner 19 posts 131 karma points
    Jan 21, 2019 @ 09:54
    Daniel Conner
    0

    I have had a similar issue to this when I receive the error message;

    Could not load file or assembly "Umbraco.ModelsBuilder" or one of its dependencies. The system cannot find the file specified

    To solve my issue I had to go the umbraco back end of the site and select developer and then the sub heading model builder, then select generate models.

    This restarted the site and when refreshed loaded up fine.

    Adding this just in case someone has the same issue and the above advice does not work.

  • Anur Abubaker 1 post 71 karma points
    Jan 21, 2019 @ 20:41
    Anur Abubaker
    0

    Hello, Exclude App_Data folder from your project. Happy coding!

  • Phong Tran 3 posts 73 karma points
    Mar 03, 2021 @ 14:16
    Phong Tran
    0

    I got the same problem and it was been fixed when I installed Umbraco.ModelsBuilder from nuget package.

Please Sign in or register to post replies

Write your reply to:

Draft