无法为'.NETCoreApp,Version = v1.0'解析'Microsoft.WindowsAzure.Storage(> = 7.2.0)'

时间:2016-08-26 15:29:29

标签: azure storage .net-core project.json

我尝试在我的dotnet核心系统(我的第一个dotnet核心项目)中使用Windows Azure存储。我尝试了unit test for Azure Storage with dotnet core并且构建得很好。

但是当我尝试在project.json中将依赖项包含到Azure存储中时,我会收到以下消息:

  

无法为'.NETCoreApp,Version = v1.0'解析'Microsoft.WindowsAzure.Storage(> = 7.2.0)'。

这是我的完整project.json文件

{
"dependencies": {
    "Microsoft.AspNetCore.Mvc": "1.0.*",
    "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.*",
    "Microsoft.AspNetCore.Server.IISIntegration":"1.0.*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.*",
    "Microsoft.AspNetCore.Diagnostics": "1.0.*",
    "Microsoft.Extensions.Configuration.EnvironmentVariables":"1.0.*",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.*",
    "Microsoft.Extensions.Configuration.Json": "1.0.*",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
    "Microsoft.Extensions.Logging":"1.0.*",
    "Microsoft.Extensions.Logging.Console": "1.0.*",
    "Microsoft.Extensions.Logging.Debug": "1.0.*",
    "Microsoft.EntityFrameworkCore": "1.0.*",
    "Microsoft.EntityFrameworkCore.Sqlite": "1.0.*",
    "Microsoft.EntityFrameworkCore.Design": { "version": "1.0.0-preview2-final", "type": "build" },
    "Autofac": "4.0.0-rc3-309",
    "Autofac.Extensions.DependencyInjection": "4.0.0-rc3-309",
    "FluentValidation": "6.4.0-beta3",
    // "Serilog" : "2.0.0",
    // "Serilog.Extensions.Logging" : "1.0.0",
    // "Serilog.Sinks.Console" : "2.0.0"
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview2-final", "type": "build" },
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
        "version": "1.0.0-preview2-final",
        "type": "build"
    },
    "Microsoft.WindowsAzure.Storage": "7.2.0.0-*"
},
"tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
        "version": "1.0.0-preview2-final",
        "imports": "portable-net45+win8+dnxcore50"
    },
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "BundlerMinifier.Core": "2.0.238",
    "Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final",
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
        "version": "1.0.0-preview2-final",
        "imports": [
            "portable-net45+win8"
        ]
    }
},
"frameworks": {
    "netcoreapp1.0": {
        "dependencies": {
            "Microsoft.NETCore.App": {
                "version": "1.0.0",
                "type": "platform"
            }
        },
        "imports": [
            // "dotnet5.6",
            "dnxcore50",
            "portable-net45+win8"
        ]
    }
},
"buildOptions": {
    "define": [ "NETCORE"], 
    "emitEntryPoint": true,
    "preserveCompilationContext": true
},
"runtimeOptions": {
    "gcServer": true
},
"publishOptions": {
    "include": [
        "wwwroot",
        "Views",
        "Areas/**/Views",
        "appsettings.json",
        "web.config"
    ]
},
"scripts": {
    "precompile": [ "dotnet bundle" ],
    "prepublish": [ "bower install" ],
    "postpublish": [
        "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
    ]
},

"tooling": {
    "defaultNamespace": "Wod6000"
}

}

你对错误有所了解吗?

1 个答案:

答案 0 :(得分:4)

我们的包名为WindowsAzure.Storage。你可以尝试一下吗?