操作系统:Windows 8 Consumer Preview
IDE:Visual Studio 11 Beta
我创建了一个空白应用程序(Windows Metro 风格)。
并添加 Google Doc API 示例代码。(如下)
发生编译错误。(在模块 System.dll 中找不到类型 System.ComponentModel.ExpandableObjectConverter)
但是当我创建控制台应用程序(Windows)时,不会发生编译错误并且 Google Doc API 运行良好。
有任何想法吗?
using System;
using Google.GData.Client;
using Google.GData.Documents;
namespace MyDocumentsListIntegration
{
class Program
{
static void Main(string[] args)
{
DocumentsService service = new DocumentsService("MyDocumentsListIntegration-v1");
// TODO: Authorize the service object for a specific user (see Authorizing requests)
// Instantiate a DocumentsListQuery object to retrieve documents.
DocumentsListQuery query = new DocumentsListQuery();
// Make a request to the API and get all documents.
DocumentsFeed feed = service.Query(query);
// Iterate through all of the documents returned
foreach (DocumentEntry entry in feed.Entries)
{
// Print the title of this document to the screen
Console.WriteLine(entry.Title.Text);
}
}
}
}