Copied to clipboard

Flag this post as spam?

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


  • Mani 11 posts 111 karma points
    Jun 16, 2021 @ 17:16
    Mani
    0

    Umbraco 9 corrupted Models using "ModelsMode.SourceCodeAuto"

    I introduced a bug in my code by accidentally delting part of the generated model and now my application doesn't work. Is there a way to re-generate the models? I tried deleting the model in question and then trying to do a rebuild, but it didn't work. I follishly do not have have repository for this application. i'd be grateful for any guidance.

    some of the errors in the error tray are: "Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'IBackgroundColourElement' could not be found (are you missing a using directive or an assembly reference?) UmbracoProject D:\Work\Teaching\Teaching Area\Subjects\Umbraco.Net5\unine5\unine5\umbraco\models\ContactSettings.generated.cs 23 Active " Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'BackgroundColourElement' does not exist in the namespace 'Umbraco.Cms.Web.Common.PublishedModels' (are you missing an assembly reference?) UmbracoProject D:\Work\Teaching\Teaching Area\Subjects\Umbraco.Net5\unine5\unine5\umbraco\models\ContactSettings.generated.cs 55 Active " "Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'IAbstract' could not be found (are you missing a using directive or an assembly reference?) UmbracoProject D:\Work\Teaching\Teaching Area\Subjects\Umbraco.Net5\unine5\unine5\umbraco\models\GeneralContent.generated.cs 23 Active " "Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'Abstract' does not exist in the namespace 'Umbraco.Cms.Web.Common.PublishedModels' (are you missing an assembly reference?) UmbracoProject D:\Work\Teaching\Teaching Area\Subjects\Umbraco.Net5\unine5\unine5\umbraco\models\GeneralContent.generated.cs 55 Active "

    Mani

  • Benjamin Carleski 33 posts 294 karma points MVP c-trib
    Jun 25, 2021 @ 15:03
    Benjamin Carleski
    100

    My best suggestion would be to hand-build a class at the expected file path, and give it enough properties to compile. That should allow you to get into the back-office and rebuild from there.

  • Mani 11 posts 111 karma points
    Jun 25, 2021 @ 21:52
    Mani
    0

    Thank you so much. I'll give that a try

Please Sign in or register to post replies

Write your reply to:

Draft