Skip to content

MajorMinorPatchTag - AssemblyVersion vs AssemblyFileVersion #544

@veccie

Description

@veccie

I don't know if this is a bug or how it's suppose to be, so this is maybe more a question about the logic and thought behind MajorMinorPatchTag.

When using the MajorMinorPatchTag scheme the applied assembly versions look like this:

[assembly: AssemblyVersion("0.4.0.12")]
[assembly: AssemblyFileVersion("0.4.0.0")]
[assembly: AssemblyInformationalVersion("0.4.0-alpha.12+Branch...")]

The AssemblyVersion has number of commits(which is correct) but AssemblyFileVersion doesn't. When I look in the code I can see that AssemblyVersion is set according to the scheme(via AssemblySemVer). AssemblyFileVersion however is always set to MajorMinorPatch + ".0", which means that the MajorMinorPatchTag scheme actually is ignored?

Why isn't AssemblyFileVersion set to AssemblySemVer also? Does it course problems elsewhere?

The AssemblyVersion is hidden from file properties, so it can be confusing to see 0.4.0.0 when deep down it's actually 0.4.0.12. I know that AssemblyInformationalVersion for example shows 0.4.0-alpha.12+Branch... but that doesn't necessarily tell me the truth about the AssemblyVersion, unless MajorMinorPatch scheme is used.

If these version numbers really are suppose to be different then shouldn't it be the other way around, if you consider what the CLR cares about: AssemblyVersion?

[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.12")]

In any case, I think both version properties should be set to the same version: 0.4.0.12 when using the MajorMinorPatchTag scheme. In fact couldn't they always be set to the same version?

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