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
"
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.
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
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.
Thank you so much. I'll give that a try
is working on a reply...