【发布时间】:2016-09-27 18:56:29
【问题描述】:
我一直在尝试使用以下代码行在 dotnet core 中访问 Azure 的 Blob 存储:
CloudStorageAccount account = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("<MyStorageName>_AzureStorageConnectionString")
);
之前我已经安装了所需的Azure SDK,并更新到了dotnet core兼容版本,然后,由于CloudConfigurationManager缺失,我安装了Microsoft.WindowsAzure.ConfigurationManager,根据this的回答。更新此包后,包还原失败并显示以下错误消息:
Package Microsoft.WindowsAzure.ConfigurationManager 3.2.1 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.WindowsAzure.ConfigurationManager 3.2.1 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
是否有任何选项可以让CloudConfigurationManager 正常工作,或者我是否需要找到解决方法?
【问题讨论】:
-
您在使用云服务吗?你真的需要使用 CloudConfigurationManager 还是 ConfigurationManager 就足够了?
-
@Thomas 我确实在使用云服务,我关注的是this tutorial
-
好的,我想知道如果您使用的是 Web 应用程序,CloudConfigurationManager 真的没有意义
标签: c# .net azure azure-storage