Windows Metro Style 应用程序出现 Google Data API 库错误

Windows Metro Style app occur error with Google Data API Library(Windows Metro Style 应用程序出现 Google Data API 库错误)

本文介绍了Windows Metro Style 应用程序出现 Google Data API 库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

OS: Windows 8 Consumer Preview
IDE: Visual Studio 11 Beta

我创建了一个空白应用程序(Windows Metro 风格).
并添加 Google Doc API 示例代码.(如下)
出现编译错误.(在模块 System.dll 中找不到类型 System.ComponentModel.ExpandableObjectConverter)

I create a Blank Application(Windows Metro style).
And add Google Doc API sample code. (It is below)
It occur compile Error.(Cannot find type System.ComponentModel.ExpandableObjectConverter in module System.dll)

但是当我创建控制台应用程序(Windows)时,不会发生编译错误并且 Google Doc API 运行良好.

But When I create a Console Application(Windows), don't occur compile Error and Google Doc API working good.

有什么想法吗?

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);
      }
    }
  }
}

推荐答案

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

It appears that the ExpandableObjectConverter class exists in the standard .NET framework, but if you look at the Metro API documentation for System.ComponentModel namespace, that class is not listed and so is not available.

我建议使用 .NET for Metro 风格应用程序 页面,了解编写 Metro 风格应用程序时可用的内容.

I recommend using the .NET for Metro style apps page to discover what is available when writing a Metro style application.

这篇关于Windows Metro Style 应用程序出现 Google Data API 库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Windows Metro Style 应用程序出现 Google Data API 库错误

基础教程推荐