【问题标题】:signed google.apis.dll is giving compiler error签名的 google.apis.dll 给出编译器错误
【发布时间】: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


【解决方案1】:

Google API 日历、云端硬盘、Youtube 的源代码均位于:https://google-api-client-libraries.appspot.com/download/library/[API_NAME]/[API_VERSION]/csharp

例如要下载最新的日历 API 源,请使用以下链接 - https://google-api-client-libraries.appspot.com/download/library/calendar/v3/csharp

【讨论】:

  • 这就是我需要的!我昨天确实对库进行了反编译,并且可以再次使用强键进行编译,但是从源代码中获取它会有所帮助。我认为提供这些库的强密钥版本也会有所帮助,尤其是当您签署现有的 dll 时它会出错。
  • 我一直在寻找这些链接一年或更长时间。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-22
  • 1970-01-01
  • 2020-08-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多