I want to develop Application which can read Token and perform PDF Signing. FYI i successfully signed pdf document, but after im update the Pkcs11Interop version from 3.3.0.0 to 4.1.1.0 Then the signed turn into failed. I've tried to enable AutoGenerateBindingRedirects but i still cant sign the PDF
Expecting the PDF is successfully signed, but i get this error
System.IO.FileLoadException: Could not load file or assembly 'Pkcs11Interop, Version=3.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
what i understand is, this application was trying to call the Pkcs11interop version=3.3.0.0
However its already mention in the Nuget Repo about its dependencies. So it's suppose to be okay right?
/* App.config */
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<dependentAssembly>
<assemblyIdentity name="Pkcs11Interop" publicKeyToken="c10e9c2d8c006d2a"/>
<bindingRedirect oldVersion="3.3.0.0" newVersion="4.1.1.0"/>
</dependentAssembly>
</configuration>
what i must do to solve this dependencies error?
I see two problems in what you're trying to do:
I might update Pkcs11Interop.PDF for newer versions of Pkcs11Interop but I have no ETA for that yet => currently it's best to just stick to Pkcs11Interop 3.3.0.