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
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
Post a Comment