Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Errors with umbraco 7.4 visual studio 2013,

Tags:

umbraco7

I am new to Umbraco. I am trying to build the website using it. Due to some issues i deleted the Umbraco project that i have created. I had back up so i copy and pasted it in visual studio project folder and tried to run. Before execution it show build error which are out of my knowledge.

The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'ModelTypeAlias' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 30 27 MyUmbracoApp Error 5 The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'ModelItemType' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 31 38 MyUmbracoApp Error 6 Type 'Umbraco.Web.PublishedContentModels.Home' already defines a member called 'Home' with the same parameter types C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\M Error 7 Type 'Umbraco.Web.PublishedContentModels.Home' already defines a member called 'GetModelContentType' with the same parameter types C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 39 42 MyUmbracoApp Error 8 Type 'Umbraco.Web.PublishedContentModels.Home' already defines a member called 'GetModelPropertyType' with the same parameter types C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 45 39 MyUmbracoApp Error 9 The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'BodyText' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 54 22 MyUmbracoApp Error 10 The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'CarouselImages' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 63 17 MyUmbracoApp Error 11 The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'FooterText' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 72 17 MyUmbracoApp Error 12 The type 'Umbraco.Web.PublishedContentModels.Home' already contains a definition for 'PageTitle' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 81 17 MyUmbracoApp Error 13 The type 'Umbraco.Web.PublishedContentModels.Glimpses' already contains a definition for 'ModelTypeAlias' C:\Users\dell\Documents\Visual Studio 2013\Projects\MyUmbracoApp\MyUmbracoApp\MyUmbracoApp\App_Data\Models\models.generated.cs 92 27 MyUmbracoApp Error 14 The type 'Umbraco.Web.PublishedContentModels.Glimpses' already contains a definition for 'ModelItemType'

like image 597
Angela khadka Avatar asked Feb 07 '23 07:02

Angela khadka


2 Answers

In your project you have a folder called App_Data. In this folder you will find a Models folder which contains all the generated .cs class files of your Umbraco project.

You can delete this folder and then rebuild the application. During the rebuild your class files will be re-generated and placed in the App_Data/Models folder.

like image 111
Mivaweb Avatar answered May 23 '23 00:05

Mivaweb


Delete didn't work for me and created different errors.

What worked for me was when I excluded the App_Data\Models folder from the project (and previously had to change the App_Data folder properties from readonly).

The project rebuilt immediately.

like image 36
Justin Avatar answered May 22 '23 23:05

Justin