Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When version attributes missing when using exe? #529

Closed
JakeGinnivan opened this issue Jul 22, 2015 · 3 comments
Closed

When version attributes missing when using exe? #529

JakeGinnivan opened this issue Jul 22, 2015 · 3 comments

Comments

@JakeGinnivan
Copy link
Contributor

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

@distantcam
Copy link
Contributor

I'm 👍 for the first option.

  • It's the easier one to back out of if the user made a mistake. Option 2 has changed files that need to be reverted.
  • It's less "magically just works" which means less code and less likely to just "magically fail".

@asbjornu
Copy link
Member

I think throwing an exception with detailed description and friendly guidance on how to fix it is the best way to go. Just throw in as much information about why it occurred and how it can be remedied and it will yield a good development experience. 😄

@asbjornu
Copy link
Member

asbjornu commented Mar 1, 2019

I believe this was fixed in #1249.

@asbjornu asbjornu closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants