[英]Google reCaptcha Enterprise NugGet Package Installation Issue
[英]Google Recaptcha Enterprise: Create Service Client issue
我已经安装了 Google.Cloud.RecaptchaEnterprise.V1(版本 1.6.0)并且我正在使用 .net 框架 4.7.1 我正在按照此处的说明进行操作https://cloud.google.com/recaptcha-enterprise/docs/create -assessment#c验证 Recaptcha。
但我面临着以下问题。 代码在尝试运行 #132 中的 Create 命令时抛出异常
第一个错误是关于版本 1.46 'Google.Apis.Auth,因为 Google.Cloud.RecaptchaEnterprise.V1(版本 1.6.0)安装了 'Google.Apis.Auth 版本 1.53 这是异常消息:
Could not load file or assembly 'Google.Apis.Auth, Version=1.46.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
然后我安装了 'Google.Apis.Auth Version=1.46 之后我看到了类似的错误,但这次是关于版本 1.53 异常:System.IO.FileLoadException
Message: Could not load file or assembly 'Google.Apis.Auth, Version=1.53.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
谁能建议如何修复它?
在 web.config 中添加绑定重定向后设法解决此问题
<dependentAssembly>
<assemblyIdentity name="Google.Apis.Auth" culture="neutral" publicKeyToken="4b01fa6e34db77ab" />
<bindingRedirect oldVersion="1.46.0.0" newVersion="1.53.0.0" />
</dependentAssembly>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.