操作系统: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);
}
}
}
}
看来可扩展对象转换器类存在于标准 .NET 框架中,但是如果您查看 Metro API 文档系统组件模型命名空间,该类未列出,因此不可用。
我建议使用用于 Metro 风格应用程序的 .NET页面以了解编写 Metro 风格应用程序时可用的内容。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)