Skip to content

GitVersionInformation in SDK-style projects #1242

@bording

Description

@bording

In 4.0, UpdateAssemblyInfo is false for the new SDK-style projects, which makes sense since the appropriate values can be injected via UpdateVersionProperties.

However, this means that the static GitVersionInformation class is also no longer generated by default, which means SDK-style projects lose the ability to inspect version properties at run-time.

Setting UpdateAssemblyInfo to true works, but it's a pain because you then end up with assembly attribute conflicts, which means you have to add something like this to your project file also:

<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>

I'd like to see the generation of GitVersionInformation be controlled separately and be enabled by default even for SDK-style projects.

Is this something that sounds reasonable? I'd be willing to work on this if it sounds like something you'd accept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions