Reflection | Get Assembly's GUID for Current DLL Build

Problem:
Get the Hash/Guid (unique value) of the running assembly, in runtime.

Solution: string myguid = Assembly.GetExecutingAssembly().GetModule("MyAssembly.dll").ModuleVersionId.ToString();

Result: 143afb59-6b87-4e8b-a187-74b57fdd3b5d

Comments

Popular posts from this blog

Breaking down document locking in SharePoint

Working around X-Frame-Options for iframes

Document ID not being generated