April 2013
Intermediate to advanced
1700 pages
92h 51m
English
When strong-named assemblies are referenced, the CLR is put in a mode where it pays extra attention to integrity of dependencies. When the runtime locates assemblies, it makes sure the strong name matches exactly what the assembly manifest refers to. If not, an exception is triggered.
As an exercise, change the version number of the calc.dll assembly by tweaking the AssemblyVersion attribute and recompiling calc.dll:
// Calc.csusing System.Reflection;[assembly: AssemblyVersion("2.0.0.0")]public static class Calc{ public static int Add(int a, int b) { return a + b; }}
Don’t recompile program.exe and try to run it with the newer version of calc.dll sitting next to ...
Read now
Unlock full access