I have a project that generates following error on compilation:
error CS0579: Duplicate \'AssemblyVersion\' attribute
I have che
I have also run into this issue in the past, so I am going to assume that your build process provides assembly information separately to providing versioning. And that causes a duplication as your project also has that info in the AssemblyInfo.cs
file. So remove the file and I think it should work.
In my case, some temporary *.cs files generated during compilation got accidentally added to the project.
The files were from the obj\Debug
directory, so they definitely shouldn't have been added to the solution. A *.cs
wildcard went a little crazy and added them incorrectly.
Deleting these files fixed the problem.
This issue is a reference conflict which is mostly peculiar to VS 2017.
I solved this same error by simply commenting out lines 7 -14 as well as Assembly version codes at the bottom of the page on AssemblyInfo.cs
It removed all the duplicate references and the project was able to build again.
I had to delete the whole repo and clone a fresh copy to get it to work.
I tried deleting all the files mentioned above but it didn't work.
In my case, there where a subfolder in a project that was a project folder it self:
file system:
solution
Then i had to remove the subfolder "tests" from the "webapi" project.
Yet another solution when upgrading core to VS2017 is to remove them in the properties\assemblyinfo.cs file.
Since they now are stored in the project.