It is my understanding that strong name signing an assembly uses some kind of hash of the assembly contents, and signs it so that if the assembly is changed after the signing then it shouldn't work anymore. However I just created a small utility to add extra win32 resources to an app after its built, and as far as I can tell it doesn't cause the strong name signed assembly to stop functioning at all.
I created a small test app, which just outputs its assembly name, strong name signed it and then added extra icons to it. Below is the program:
class Program
{
static void Main(string[] args)
{
Console.WriteLine("My name is " + Assembly.GetExecutingAssembly().GetName());
}
}
After I modify the assembly I can still run it, and it prints out its assembly name with my public key token with no problems:
My name is TestApp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cd4a03be895200fa
Now, my question is, does the strong name signing only check some parts of the assembly, i.e. does it not hash the win32 resources, or am I completely misunderstanding how strong name signing works? If my assembly has been changed after signing, shouldn't it stop working?