Skip to content

Commented out AssemblyVersion tags still causing GitVersion to not generate versions correctly #1939

@KiLLeRRaT

Description

@KiLLeRRaT

Hi All,

I found the following problem. I installed GitVersionTask, and commented out my AssemblyVersion tags from my AssemblyInfo.cs file.

After building, GitVersion would version my dll as 0.0.0.0.

I received the warning:

File contains assembly version attributes which conflict with the attributes generated by GitVersion

I looked in the code for the detection, and it looks like it expects a full line,

RegexOptions.Singleline);

My AssemblyInfo.cs looks like this:

//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("19.04.15")]
//[assembly: AssemblyInformationalVersion("19.04.15-1822afec")][END OF FILE]

Updating my AssemblyInfo to the following did the trick:

//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("19.04.15")]
//[assembly: AssemblyInformationalVersion("19.04.15-1822afec")]
[END OF FILE]

Not sure if you want to fix this, but here it is anyway, in case someone else runs into the same problem.

Cheers,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions