visual studio 2010 - Unique id/code of every deployed application -


i believe every deployed product (application) vs has unique id or smth that, doesn't change on distribution. mean publish app , give company 100 employees , product remains same unique id on every single pc installed.

i have come across guid assembly information of program's project, not sure one. there such unique id of product, , if yes - can find , how can access in code itself. i.e.: string uniqueid = something.getproductid() or whatever...

there 2 methods guid,

fristly, can guid in assembly information.

//gets assembly contains code executing. assembly asm = assembly.getexecutingassembly(); guid id= asm.gettype().guid; 

secondly, not taken assembly information.stored real custom attribute.

var attribute = (guidattribute)asm.getcustomattributes(typeof(guidattribute),true)[0].; var id = attribute.value; 

more info can see

assembly.getcustomattributes method (type, boolean)

http://msdn.microsoft.com/en-us/library/88d17d13.aspx

assembly.getexecutingassembly method

http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexecutingassembly.aspx


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -