GitVersion: [Bug] The item "obj\Debug\GitVersionInformation.g.cs" was specified more than once in the "Sources" parameter

Hello.

Describe the bug I have C# project on .Net Framework 4.7.2. I upgrade nuget from <package id="GitVersionTask" version="5.0.1" targetFramework="net472" developmentDependency="true" /> to <package id="GitVersionTask" version="5.2.4" targetFramework="net472" developmentDependency="true" />

When build I got this error:

The item “obj\Debug\GitVersionInformation.g.cs” was specified more than once in the “Sources” parameter. Duplicate items are not supported by the “Sources” parameter. C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 59

I have another 33 projects (.Net Framework and .Net Core and .Net Standard) in this solution and all other projects build OK.

Any suggesions what’s happen and how fix this?

My Environment

Operating System Windows 10 Visual Studio 16.5.3

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 18 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Sure @arturcic I will create a new sample project with the same dependencies as the one that is not building and will share it.