How can I check the .NET assembly for freshness?

All,

I am working on a SharePoint project, but this is not a SharePoint specific issue. I have an assembly that I deployed to a SharePoint farm, and I would like to check if my "latest version" is sitting in the GAC, or instead, the old version from yesterday is sitting in its place. This is a test farm, so yes, we are constantly updating versions.

Without doing anything crazy, like changing the version of the assembly itself each time you compile *, is there some kind of assembly property that I can check (or set at compile time)?

* I have to clarify that in SharePoint projects we rigidly set the full name of the assembly in several places (including XML files), so changing the version of the assembly is a less memorable option than you might think.

+3
source share
3 answers

The Assembly Version is the intended mechanism for this, but you can overturn your own by comparing the MD5 hash of the GAC assembly with the MD5 of your latest version.

+5
source

You can use the AssemblyFileVersion attribute. In AssemblyFileVersion docs

Instructs the programmer to use a specific version number for the resource version of the Win32 file. The version of the Win32 file does not have to match the version number of the assembly.

+4
source

. web.config app.config, ( SharePoint) :

: http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx

, . SharePoint.

+3
source

Source: https://habr.com/ru/post/1698484/


All Articles