Windows Metro Style app occur error with Google Data API Library

允我心安 提交于 2019-12-31 01:55:11

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/10509955/windows-metro-style-app-occur-error-with-google-data-api-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!