的Windows Metro风格应用程序出现的错误与谷歌数据API库 [英] Windows Metro Style app occur error with Google Data API Library

查看:128
本文介绍了的Windows Metro风格应用程序出现的错误与谷歌数据API库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Windows 8消费者预览结果
IDE:Visual Studio的测试版11搜索



我创建了一个空白的应用程序(Windows Metro风格) 。结果
和谷歌添加文件API示例代码。 (这是下文)结果
它发生编译错误。(找不到模块System.dll中型System.ComponentModel.ExpandableObjectConverter)结果



但是当我创建一个控制台应用程序(Windows)中,不发生编译错误和谷歌文档API做工不错。



任何想法?

 使用系统; 
使用Google.GData.Client;使用Google.GData.Documents
;

命名空间MyDocumentsListIntegration
{
类节目
{
静态无效的主要(字串[] args)
{
DocumentsService服务=新DocumentsService(MyDocumentsListIntegration-V1);

// TODO:授权特定用户的服务对象(见授权请求)

//实例化一个DocumentsListQuery对象来检索文件。
DocumentsListQuery查询=新DocumentsListQuery();

//使该API的请求,并得到所有文档。
DocumentsFeed饲料= service.Query(查询);

//迭代通过所有的文件返回
的foreach(在feed.Entries DocumentEntry项)
{
//打印文档的标题画面
Console.WriteLine(entry.Title.Text);
}
}
}
}


解决方案

看来, ExpandableObjectConverter 类存在于标准的.NET框架,但是如果你看对的 System.ComponentModel 命名空间,该类未列出,因此无法使用。



我建议使用 .NET为Metro风格应用页面发现编写Metro风格的应用程序时,什么是可用的。


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

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)

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

Any ideas?

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

解决方案

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.

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

这篇关于的Windows Metro风格应用程序出现的错误与谷歌数据API库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆