Skip to content

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

@riksking

Description

@riksking

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions