All,
I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se. I have an assembly I've deployed to a SharePoint farm, and I'd like to verify whether my "newest version" is sitting in the GAC, or if an older version from late yesterday is sitting there instead. This is a test farm, so yes, we are revving versions constantly.
Without doing anything crazy like changing the assembly version itself every time I compile*, is there some assembly property I can check (or set at compile-time)?
*I should clarify, in SharePoint projects we hardcode the assembly's full name in multiple places (including XML files), so changing the assembly version is a less savory option than you might think.
Assembly Version is the intended mechanism for this, but you could roll your own by comparing an MD5 hash of the GAC assembly with the MD5 of your latest version.
You could use AssemblyFileVersion attribute. From the docs, the AssemblyFileVersion
Instructs a complier to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With