ProductVersion and Copyright should change dynamically based on Build update
Currently, I see the Copyright and Product version is a constant variable.
But I want to change this dynamically. My build will change the Assembly Version (Assembly.cs) based on the release it is going dynamically.
Now how can I update this accordingly to my Plugin?
If your version information is in project properties, they can be added to the SHFB project as custom properties and referenced in the copyright and product version SHFB properties using the substitution syntax ({@MajorVersionNumber}.{@MinorVersionNumber} for example). I know others have done it that way though I don't recall the specifics.
I have defined the copyright and footer as follows in the SHFB project (note, the &s are actually entered as "& followed by ; with no spaces):
And FullBuildNumber is a property defined as follows:
Hi,
The above comments are related to copyright in SHFB. But my question was I created a custom plugin, where I need to mention the version and Copyright attributes right.
These values I need to do it dynamically.
[HelpFileBuilderPlugInExport("PlugIn", Version = AssemblyInfo.ProductVersion, Copyright = AssemblyInfo.Copyright, Description = "plug-in", IsConfigurable = true)]
Currently, these values are getting from the assembly info class. But these values I should populate dynamically based on AssemblyVersion which my build will update.
EDIT: Ignore my last reply if you read it. I don't think you can do this dynamically as these are attribute values and are set at compile time. You mention that your build process is modifying AssemblyInfo.cs, you will probably have to do something similar to update the values for the attributes.