Skip to content

When version attributes missing when using exe? #529

Closed
@JakeGinnivan

Description

@JakeGinnivan

Update:
We have decided on option 1, when the version attributes cannot be found to update in GitVersion.exe, we should raise an error.


Original:
The Task requires version attributes to not be present (because they are inserted into the MSBuild pipeline) and the exe is updating assembly info files so the attributes are required to be there.

This can cause issues migrating between the two (especially from task to exe). I see two ways to resolve this:

  1. Throw error when attributes cannot be found in the exe
    • This could also highlight errors when version info is in a commonassemblyinfo.cs, prompting the user to specify the filename which should be updated
  2. If the attributes cannot be found, insert them rather than replace.
    • Currently we just replace the ones that can be found, so if you want the Info attribute with everything, just put it into your assembly info files and it will be updated
    • Will mean duplicates if using the commonassemblyinfo.cs approach

I think 1 is the way to go, but want feedback.

// @gep13 @asbjornu @distantcam

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