Allow control of AssemblyInformationVersion specifically - #528
Conversation
28fc3ae to
406aa9e
Compare
|
|
||
| <PropertyGroup> | ||
| <FileVersion Condition="'$(FileVersion)' == ''">$(AssemblyVersion)</FileVersion> | ||
| <InformationalVersion Condition="'$(InformationalVersion)' == ''">$(AssemblyVersion)</InformationalVersion> |
There was a problem hiding this comment.
The value used to come straight from
There was a problem hiding this comment.
Yes that looks incorrect. It should be $(Version)
There was a problem hiding this comment.
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.
Ex $(Version) = 4.0.0-build123
Ex $(AssemblyVersion = 4.0.0.0
|
|
||
| <Target Name="CoreGenerateAssemblyInfo" | ||
| Condition="'$(Language)'=='VB' or '$(Language)'=='C#'" | ||
| DependsOnTargets="GetAssemblyVersion" |
There was a problem hiding this comment.
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.
If it's unrelated, please revert.
nguerrera
left a comment
There was a problem hiding this comment.
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.