Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Oct 26, 2021

Context: #894

Setting <Version>0.1.0.0</Version> causes us to generate:

[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0.0")]

because of the extra tuple added to AssemblyFileVersion in AssemblyInfo.g.cs.in:

[assembly: System.Reflection.AssemblyFileVersionAttribute("@[email protected]")]
[assembly: System.Reflection.AssemblyVersionAttribute("@VERSION@")]

This is fine from an assembly reference standpoint because it uses [AssemblyVersion], but [AssemblyFileVersion] isn't a valid file version and Windows can't parse it:

image

Instead, set @VERSION@ to always use a 4-tuple, and remove the extra tuple added to AssemblyFileVersion.

This creates the expected information for both hard-coded version assemblies:

image

and auto-versioned assemblies:

image

@jpobst jpobst changed the title [Java.Interop{,Export}] Set Version to 0.1.0. [Java.Interop{,Export}] Set <Version> to 0.1.0. Oct 26, 2021
@jpobst jpobst marked this pull request as ready for review October 26, 2021 21:21
@jpobst jpobst requested review from dellis1972 and jonpryor November 1, 2021 20:46
@jonpryor jonpryor merged commit e56a8c8 into main Nov 2, 2021
@jonpryor jonpryor deleted the too-many-zeroes branch November 2, 2021 01:22
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants