问题
I got the source code for the latest Google.Apis, Google.Apis.Core and Google.Apis.Auth.dll (all 1.9.x.x) and compiled them with strong name. Now when I compile my code using the strong named dlls it gives an error:
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'
in the line: UserCredential credential = new UserCredential(flow, "me", token);
Everything works just fine without strong name. I need to add the strong name because my main program where this library is referred has strong name.
Any ideas?
回答1:
The sources for Google APIs Calendar, Drive, Youtube and all are available at: https://google-api-client-libraries.appspot.com/download/library/[API_NAME]/[API_VERSION]/csharp.
For example to download the latest Calendar API source, use the following link - https://google-api-client-libraries.appspot.com/download/library/calendar/v3/csharp
来源:https://stackoverflow.com/questions/26689496/signed-google-apis-dll-is-giving-compiler-error