How to fix Azure DevOps Error CS0579

During build process of one ASP.NET web application in Azure DevOps environment, I face the error  CS0579 multiple times. Everything looks great to me, but continuous crappy error keep saying issues in AssemblyInfo.cs file.

Below are few red error I have face during setup this project.

"SharePointServicesWebApp\Properties\AssemblyInfo.cs(8,12): Error CS0579: Duplicate 'AssemblyTitle' attribute"

##[error]SharePointServicesWebApp\Properties\AssemblyInfo.cs(9,12): Error CS0579: Duplicate 'AssemblyDescription' attribute

##[error]SharePointServicesWebApp\Properties\AssemblyInfo.cs(10,12): Error CS0579: Duplicate 'AssemblyConfiguration' attribute

##[error]SharePointServicesWebApp\Properties\AssemblyInfo.cs(11,12): Error CS0579: Duplicate 'AssemblyCompany' attribute



I was quite sure there is something coming up during build process and make this as duplicate.
Because this build process also provides assembly information other way round which contains itle, versioning etc. So, it means to me how it cause a duplication. My project do have a file and same thing provided by the build process. 

To fix this issue, I simply comments all the lines in AssembleyInfo.cs file. And then start build, it works for me.Other alternate solution you can try to delete the AssembleyInfo.cs file and then build it. 

Hope this will help you!


Comments

Post a Comment

Popular posts from this blog

How to fix Azure DevOps error MSB4126

How to create Custom Visuals in Power BI – Initial few Steps

SharePoint Admin Center