【发布时间】:2014-11-02 08:34:39
【问题描述】:
我得到了最新的 Google.Apis、Google.Apis.Core 和 Google.Apis.Auth.dll(都是 1.9.x.x)的源代码,并用强名称编译了它们。现在,当我使用强命名的 dll 编译我的代码时,它会给出一个错误:
The type 'Google.Apis.Services.BaseClientService.Initializer' is defined in an assembly that is not referenced. You must add a reference to assembly 'Google.Apis, Version=1.9.0.23042, Culture=neutral, PublicKeyToken=null'
在线:UserCredential credential = new UserCredential(flow, "me", token);
没有强名称一切正常。我需要添加强名称,因为引用此库的主程序具有强名称。
有什么想法吗?
【问题讨论】:
-
好的,我得到了一些线索,如果我删除了与 Google.Apis.Plus.v1 和 Google.Apis.Calendar.v3 相关的代码,那么代码就会编译。即使我为这些 dll 添加了强密钥,它们也会引起一些问题。有人可以告诉我在哪里可以找到这些 dll 的 dotnet 源,以便我可以使用强键重新编译源。我在谷歌代码库中搜索过,但它们似乎是使用某些工具生成的。
-
更新:我从 code.google.com 下载的文件 Google.Apis.Calendar.v3.cs 似乎是为 .net framework 2.0 创建的,所以它很旧。任何想法谷歌将新文件放在哪里或我们如何生成一个?
标签: c# google-api google-oauth google-api-dotnet-client