While working on signing assemblies you may run into a problem I encountered this morning so here goes…
To see this in action try the following
Build error occurred in the XAML MSBuild task: 'Could not load file or assembly 'file:///d:\spike\ActivityLibrary1\bin\Debug\ActivityLibrary1.dll' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.
To make this problem even worse, try this.
<PropertyGroup> <SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup> <AssemblyOriginatorKeyFile>Test.snk</AssemblyOriginatorKeyFile></PropertyGroup><PropertyGroup> <DelaySign>true</DelaySign></PropertyGroup>
To correct this, just delete the DelaySign property group or set it to false.
Hope this saves you a couple of hours of troubleshooting.
Happy Coding!
Ron Jacobs http://blogs.msdn.com/rjacobs Twitter: @ronljacobs http://twitter.com/ronljacobs