I am trying to introduce Strong Signing in my project assemblies.
My project output is persisted in XML and a type is mentioned (before signing) as:
typestr="XYZ.PQR, MyWidget, Version=1.0.2406.20198, Culture=neutral, PublicKeyToken=null"
After all the assemblies are signed with public-key with token, 622edca63ee1770c. I have introduced <assemblyBinding> block in my app.config file as follows:
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="MyWidget" publicKeyToken="622edca63ee1770c" culture="neutral"/>
<bindingRedirect oldVersion="1.0.2406.20198" newVersion="0.1.27.10695"/>
</dependentAssembly>
</assemblyBinding>
I am still getting Error:
Could not load file or assembly 'EPGWidget, Version=1.0.2406.20198, Culture=neutral, PublicKeyToken=622edca63ee1770c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
When a code piece like:
Type type = Type.GetType(typestr);
following is executed. However, it works for:
typestr="XYZ.PQR, MyWidget"