Copied to clipboard

Flag this post as spam?

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


  • James C 3 posts 103 karma points
    Mar 30, 2017 @ 10:32
    James C
    0

    Build / deployment error

    We're having a bit of bother with our TFS builds and Azure deployments, hope someone can offer some assistance.

    What happens in both cases is that after the build/deployment, we see the error message:

    The model item passed into the dictionary is of type X, but this dictionary requires a model item of type X

    So X is the same exact model in each case.

    We can resolve this with TFS builds by changing permissions on the root site folder of the build - not actually changing anything, just ticking/unticking a box to reset the permissions.

    With Azure, this option isn't open to us as we don't have access to the build folder. Has anyone ever seen anything like this?

    Any help would be appreciated, thanks.

  • James C 3 posts 103 karma points
    Apr 04, 2017 @ 08:20
    James C
    0

    Anybody? Even if we could understand what was generating the error message in Umbraco we could try and debug the issue accurately. Thanks.

  • James C 3 posts 103 karma points
    Apr 10, 2017 @ 09:48
    James C
    100

    If anyone else finds this, we resolved this by changing ModelsMode in Web.config to Dll:

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

    Then once we had done a build, we went into the Models Builer tab of the Development section and hit Generate models. This works even if you're not using ModelsBuilder on the site.

  • Jason Taylor 1 post 71 karma points
    Apr 11, 2017 @ 21:50
    Jason Taylor
    0

    We are also getting this error with custom models in the App_Code Folder running on azure

    The model item passed into the dictionary is of type 'MemberLoginModel', but this dictionary requires a model item of type 'MemberLoginModel'

    Would really rather not move all code into a dll, anybody got any ideas?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies