I am trying to build Prism in .net 4.5. There's a conflict with assembly versions of Unity 3.0 and Unity Extensions.
I have Disassembled a WPF (Prism).dll file (Microsoft.Practices.Prism.UnityExtensions.dll) using ILDASM, there I got 3 files with extensions like .IL, .res and .g.resources. I have changed the version number of a referenced file in metadata of the .IL file and assembled the file into .dll.
After using the new (Microsoft.Practices.Prism.UnityExtensions.dll) with updated (3.0.0.0 instead of 3.0.1208.0) version number of referenced Microsoft.Practices.Prism.Unity.dll, I am getting below exception.
Could not load file or assembly 'Microsoft.Practices.Prism.UnityExtensions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
I have signed the new dll but with an untrusted certificate.
I think this has to do with assembly verification. Because you edited it, you need to re-sign it. Because you could have added evil code to the already-verified DLL. Check out this for disabling verification, but I don't think that is a long term solution.
I've done this as we updated to using .NET 4.5 with Unity 3 and Prism. You need to re-sign UnityExtensions in order to use Unity 3.0.XXX.X
Here is a few easy steps that will get you through:
User contributions licensed under CC BY-SA 3.0