|
Is it possible to change an external assembly's property using reflection; specifically the GUID? The reason I'm trying to do this is for when a customer logs into my website and purchases a plug-in for the application. The server would then change the GUID within the plug-in's DLL and then allow the custom to download it. When they then go to install the plug-in, the application check the assembly's GUID to see if it matches what it's supposed to. This is part of the security system I have designed (within my head at the moment) to ensure that the assembly is allowed to be used, and can only be used by that specific person. So is there anyway to change the GUID of an assembly through reflection?
Thanks
|
|
|
|
|
You can't make modifications using reflection; it's a read-only game. There are multiple ways to generate a new assembly; using the CompilerService[^] would be an option, but "modifying" an existing assembly would be easier using Mono's Cecil.
|
|
|
|
|
So if I understand correctly, based on my quick read of the link you provided, with the Mono's Cecil I could open up an assembly that I created, modify the GUID assembly attribute, and then save it to a new file and server it to the customer for download?
|
|
|
|
|
Yes
|
|
|
|