-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow control of AssemblyInformationVersion specifically #528
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
Allow control of AssemblyInformationVersion specifically #528
Conversation
28fc3ae
to
406aa9e
Compare
@@ -123,6 +123,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
|
|||
<PropertyGroup> | |||
<FileVersion Condition="'$(FileVersion)' == ''">$(AssemblyVersion)</FileVersion> | |||
<InformationalVersion Condition="'$(InformationalVersion)' == ''">$(AssemblyVersion)</InformationalVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value used to come straight from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that looks incorrect. It should be $(Version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I wasn't sure which would be better. I don't remember my reasoning for going this way so I'll switch to what you agree on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ex $(Version) = 4.0.0-build123
Ex $(AssemblyVersion = 4.0.0.0
Condition="'$(GenerateAssemblyInfo)' == 'true'" /> | ||
|
||
<Target Name="CoreGenerateAssemblyInfo" | ||
Condition="'$(Language)'=='VB' or '$(Language)'=='C#'" | ||
DependsOnTargets="GetAssemblyVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent of having GetAssemblyVersion on GenerateAssemblyInfo and not here was to make it so that the AssemblyVersion is always available to CoreGenerateAssemblyInfo overrides for languages other than C# or VB.
Is moving this related to the feature requested here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's unrelated, please revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. I think it's a good change.
See my comment about moving GetAssemblyVersion dependency for the primary reason for my requesting changes status.
Also, I know how you feel about it in general, but please squash. I think it only obscures the simplicity of a +5,-3 change to split it over 4 commits.
Agreed. I was considering a local squash and forced push myself, but wanted to see if there were concerns with the DependsOnTargets change. |
c5340c1
to
c1468af
Compare
@nguerrera I've made the changes you requested. |
BTW, for NB.GV to leverage this instead of just turning it off, it will have to know whether a project that is using it actually has this .targets imported. How can an imported .targets file determine that this is the new SDK/cross-targeting project? Is there a new property (value) set that I can condition on? |
@srivatsn in case this needs ask mode approval |
I don't think we have a good property set to use for that purpose. We should come up with one. |
The Nerdbank.GitVersioning package sets a bunch of assembly version information including the git commit ID in the AssemblyInformationVersion attribute. This fixes the build authoring so that this attribute's value in particular can be customized rather than being set only to the same value as the nuget package.