我正在使用VS2012在C#中创建一个控制台应用程序,该应用程序应与Google的Calendar API进行交互 . 按照在线说明,我尝试使用以下命令通过NuGet检索此API的.NET版本:
安装包Google.Apis.Calendar.v3
成功安装此软件包后,添加从此页面的.NET部分复制的一些代码
https://developers.google.com/google-apps/calendar/instantiate
我试图编译 . 但是,编译尝试因这些错误而失败:
1> E:\ tools \ daxtell \ PunchCardOps \ GoogleCalendarApiOps \ GoogleCalendarSvc.cs(1,19):错误CS0234:命名空间“Google.Apis”中不存在类型或命名空间名称“Auth”(您是否缺少程序集)参考?)1> E:\ tools \ daxtell \ PunchCardOps \ GoogleCalendarApiOps \ GoogleCalendarSvc.cs(3,19):错误CS0234:命名空间“Google.Apis”中不存在类型或命名空间名称“服务”(你是吗?)缺少程序集引用?)
我该怎么做才能解决这些错误?
1 回答
日历nuget包有两个依赖项(https://www.nuget.org/packages/Google.Apis.Calendar.v3):
https://www.nuget.org/packages/Google.Apis/
和https://www.nuget.org/packages/Google.Apis.Auth/