【问题标题】:Windows Metro Style app occur error with Google Data API LibraryWindows Metro Style 应用程序出现 Google Data API 库错误
【发布时间】:2012-05-09 04:43:19
【问题描述】:

操作系统:Windows 8 消费者预览版
IDE:Visual Studio 11 测试版

我创建了一个空白应用程序(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);
      }
    }
  }
}

【问题讨论】:

  • 啊,我也有同样的问题...确实需要用于 Metro 应用程序的 Google API...您是如何解决这个问题的?

标签: c# windows-8 windows-runtime google-docs-api


【解决方案1】:

ExpandableObjectConverter 类似乎存在于标准 .NET 框架中,但如果您查看 System.ComponentModel 命名空间的 Metro API 文档,该类未列出,因此不可用。

我建议使用.NET for Metro style apps 页面来发现编写 Metro 风格应用程序时可用的内容。

【讨论】:

    猜你喜欢
    • 2012-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多