304NotModified / Fody.Stamp

:octocat: Stamps an assembly with git data
MIT License
65 stars 19 forks source link

Stamp.Fody replaces AssemblyFileVersion with AssemblyVersion #13

Open forbjok opened 9 years ago

forbjok commented 9 years ago

When using Stamp.Fody (1.2.2 w/ Fody 1.29.3) on a project that has both AssemblyVersion and AssemblyFileVersion specified, AssemblyFileVersion gets overwritten by the AssemblyVersion.

In some cases, this is a problem, as we often have an AssemblyVersion that only uses the major and minor version numbers (in order to preserve binary compatibility when there are no breaking changes), while the AssemblyFileVersion is the actual full version including the patch number.

SimonCropp commented 9 years ago

So what r u proposing?

forbjok commented 9 years ago

I think the best solution for this particular situation would be an option to use AssemblyFileVersion instead of AssemblyVersion.

Alternatively, or additionally, an option to only set the AssemblyInformationalVersion without touching the file version. In that case, if the AssemblyVersion was still used, it would contain the wrong version number, but it would at least have the correct Git information and the file version would still be correct.

SimonCropp commented 8 years ago

ok send me a PR with a configuration switch

asherber commented 7 years ago

I'm curious, did anything ever happen with this issue? I'm facing the same issue, especially since I'm trying to follow https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/

IOW, I want to have something like this:

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2+bead1234")]

I'm happy to do some coding on this if it's still open.

SimonCropp commented 7 years ago

this project is no longer maintained. raise a new issue if u want to take ownership

SimonCropp commented 6 years ago

closing this as stale. if it is still an problem please raise a new issue

304NotModified commented 6 years ago

planned for 1.5