【问题标题】:Is Azure.ConfigurationManager compatible with .Net Core?Azure.ConfigurationManager 是否与 .Net Core 兼容?
【发布时间】:2017-02-12 17:23:41
【问题描述】:

我正在使用 .Net Core v1.0,并希望在我的应用程序中使用 Azure 表存储。我通过 NuGet 成功安装了 Azure.Storage 包,但是当我安装 Azure.ConfigurationManager 包时,我在执行 dotnet restore 时收到此错误:

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.

有没有办法解决这个问题?如果没有 ConfigurationManager,我还能使用 Azure 表存储吗?

谢谢!

编辑(2016 年 10 月 4 日):
您似乎可以在没有 ConfigurationManager 的情况下使用 Azure 表存储,但您将无法在运行时访问和修改应用程序设置。 Storage Configure Connection String - Parsing a Connection String

【问题讨论】:

  • 如果您找到答案,您可以自己添加答案 :) 这不是问题,因为您可以使用标准 ASP.NET Core 设置来存储连接字符串。

标签: azure azure-storage azure-blob-storage


【解决方案1】:

Azure.ConfigurationManager 与 .NET Core 不兼容。

ConfigurationManager 是可选的,因此在使用 Azure 表存储时不是必需的。您也可以使用 .NET Framework 的 ConfigurationManager Class

作为替代品

Storage Configure Connection String - Parsing a Connection String

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-26
    • 1970-01-01
    • 2020-11-15
    • 2016-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多