【发布时间】:2019-12-04 03:49:24
【问题描述】:
我正在尝试在蓝色棱镜中添加一项 google vision API 功能,但出现错误
“内部:无法执行代码阶段,因为代码阶段引发了异常:无法加载文件或程序集“Google.Apis.Auth,版本=1.35.1.0,文化=中性,PublicKeyToken=4b01fa6e34db77ab”或其中之一它的依赖关系。找到的程序集的清单定义与程序集引用不匹配。(HRESULT 异常:0x80131040)"
但提到的 dll 在 Blue prism 文件夹中可用,我已在初始化页面中添加了引用。 Google.Apis.Auth的当前版本是1.40.2,但是我试了1.35.1.0的版本,还是没用。我尝试添加其他线程中提到的引用“Google.Cloud.PubSub.V1”,但这也不能解决问题。
下面提到的带有 dll 引用的代码在 Visual Studio 中运行良好,但在 blueprism 中却不行。
请有人帮我解决这个问题
var image = Image.FromFile("C:/New folder/Google VisionAI/otter_crossing.jpg");
var client = ImageAnnotatorClient.Create();
var response = client.DetectText(image);
foreach (var annotation in response)
{
if (annotation.Description != null)
{
Output = annotation.Description;
}
}
【问题讨论】:
标签: c# .net google-vision blueprism