在"微软的Azure配置管理器"库不适用于UWP应用。建议? [英] The "Microsoft Azure Configuration Manager" library is not available for UWP apps. Suggestions?

查看:219
本文介绍了在"微软的Azure配置管理器"库不适用于UWP应用。建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在微软Azure配置管理器库不与UAP应用程序兼容,看来我需要它来访问CloudConfigurationManager类连接到Azure存储。它被用于解析的连接字符串:

The "Microsoft Azure Configuration Manager" library is not compatible with UAP apps and it seems that I need it to access the CloudConfigurationManager class for connecting to Azure Storage. It is used to parse the connection string:

// Parse the connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
    CloudConfigurationManager.GetSetting("StorageConnectionString"));

我失去了一些东西在这里还是有可能获取用于连接UWP应用程序开发人员的另一种方法?

Am I missing something here or is there maybe an alternative approach for getting connected for UWP app developers?

我指的是该指南:的这里

推荐答案

我不相信你必须使用CloudConfigurationManager。

I don't believe you have to use CloudConfigurationManager.

您可以手动连接到它:

var credentials = new StorageCredentials("accountname", "accountkey");
var account = new CloudStorageAccount(credentials, true);

请注意:你必须有WindowsAzure.Storage引用但与UWP兼容。它的配置管理器,是不是。

Note: You will have to have WindowsAzure.Storage referenced but that is compatible with UWP. Its the configuration manager that is not.

这篇关于在"微软的Azure配置管理器"库不适用于UWP应用。建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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