304NotModified / Fody.Stamp

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

COMPANY_NAME, COPYRIGHT and PRODUCT_NAME are being lost as verpatch.exe is not used in patch mode. #10

Closed mlarman70 closed 9 years ago

mlarman70 commented 10 years ago

Hi,

We seem to be loosing company name, copyright and product name when using Fody.Stamp to set AssemblyInformationalVersionAttribute.

It seems the call to verpatch.exe includes "/va" which indicates it is in replace rather than patch mode. This seems to cause COMPANY_NAME, COPYRIGHT and PRODUCT_NAME to be lost.

To see this in action run the unit tests and navigate to the directory AssemblyToProcessExistingAttribute\bin\Debug\

In windows explorer right click on the modified dll (AssemblyToProcessExistingAttribute2.dll) and select Properties/Details. When run on windows 7 we can observed that the product name has been wiped and copyright has been set to "Copyright (c) 2009"

It would be useful if Fody.Stamp could run verpatch in patch mode so old values are not lost.

If the code is modified to remove the "/va" and the tests re run the Properties/Details show the correct values.

SimonCropp commented 9 years ago

want to try for a PR?

ldv2001 commented 9 years ago

My PR solves this.