我想要开发的应用程序,可以读取令牌和执行PDF签名。FYI成功地签署了pdf文档,但是在im将Pkcs11Interop版本从3.3.0.0更新到4.1.1.0之后,签名变成失败。我尝试过启用AutoGenerateBindingRedirects,但我仍然不能签署PDF文件
预期PDF已成功签名,但我得到了此错误
System.IO.FileLoadException:无法加载文件或程序集“Pkcs11Interop、Version=3.3.0.0、Culture=neutral、PublicKeyToken=null”或其依赖项之一。所定位的程序集的清单定义与程序集引用不匹配。(HRESULT例外: 0x80131040)
据我所知,这个应用程序试图调用Pkcs11interop version=3.3.0.0
然而,它已经在Nuget中提到了它的依赖关系。所以应该没事的,对吧?
/* 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>要解决这个依赖关系错误,我必须做些什么?
发布于 2019-06-02 09:16:45
我看到你想要做的事情有两个问题:
我可能会为更新版本的Pkcs11Interop.PDF更新Pkcs11Interop,但是我没有ETA,但是=>目前最好还是坚持使用Pkcs11Interop 3.3.0。
https://stackoverflow.com/questions/56388250
复制相似问题