Copied to clipboard

Flag this post as spam?

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


  • Nancy A. 44 posts 175 karma points
    May 16, 2019 @ 12:43
    Nancy A.
    0

    ModelBuilder not working

    Hi all, I've managed to get a site up and running in Umbraco 8 but one of my challenges is that it appears that the model builder isn't working. I'm not able to use strong typed models, instead am using '@Model.Value('aString') with @model.IPublished.Content.

    In looking to what may be causing the issue,I noticed that the App_Data folder wasn't included in the project, so upon including it and doing a build, I got a bunch of errors:

    enter image description here

    Can anyone tell me what happened here? What is causing all the duplicates (I'm building the site using both Umbraco's back office and in VS).

    I tried deleting the folder and doing a rebuild per another thread in this forum but it caused catastrophic failures (lost log-in information, etc). Not sure what my other options are.

  • Bryna 73 posts 259 karma points
    May 20, 2019 @ 18:27
    Bryna
    0

    If the site was up and running before including the appdata folder, then I would wager that you have those types defined somewhere else so that it would work(eg another included reference DLL that has the types defined or another cs file that was added in VS that has multiple classes within it). Try getting rid of all the files in your appdata folder. If it compiles, search the project to see where one of your classes is(eg News) and remove that class. Then include the corresponding app_data/{ClassName}.generated.cs file.

    Good Luck.

Please Sign in or register to post replies

Write your reply to:

Draft