2016-08-16 113 views
2

多個解決方案Asp.net核心應用時,當我嘗試建立&與Bluemix多個解決方案部署Asp.net核心應用程序,獲得以下錯誤日誌:錯誤部署與Bluemix

-----> Restoring dependencies with Dotnet CLI 

    log : Installing BundlerMinifier.Core 2.0.238. 
    error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in /tmp/staged/app/src/MyProject.Utility/project.json... 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in /tmp/staged/app/src/MyProject.Core/project.json... 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in /tmp/staged/app/src/dotnetCloudantWebstarter/project.json... 
    error: Package Microsoft.AspNetCore.Mvc.Core 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.Core 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 

    error: Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /tmp/staged/app/src/MyProject.Utility/project.json... 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /tmp/staged/app/src/MyProject.Core/project.json... 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /tmp/staged/app/src/dotnetCloudantWebstarter/project.json... 
    log : Installing Microsoft.AspNetCore.Mvc.ViewFeatures 1.0.0. 
    log : Installing MyCouch.Cloudant 4.0.0. 
    error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    error: Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Writing lock file to disk. Path: /tmp/staged/app/src/MyProject.Core/project.lock.json 
    log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /tmp/staged/app/MyProject.Core/project.json... 
    error: Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Writing lock file to disk. Path: /tmp/staged/app/src/MyProject.Utility/project.lock.json 
    log : ./src/MyProject.Core/project.json 
    log : Restore failed in 11621ms. 
    log : ./src/MyProject.Utility/project.json 
    log : Restore failed in 11692ms. 
    error: Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 

    warn : dotnetCloudantWebstarter (>= 1.0.0) -> Microsoft.Extensions.Configuration.Json (>= 1.0.0-rc2-final) 
    error: Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package cloudscribe.Web.Pagination 1.0.3 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package cloudscribe.Web.Pagination 1.0.3 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - net452 (.NETFramework,Version=v4.5.2) 
    error: - net46 (.NETFramework,Version=v4.6) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package NonFactors.Grid.Core.Mvc6 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package NonFactors.Grid.Core.Mvc6 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Writing lock file to disk. Path: /tmp/staged/app/src/dotnetCloudantWebstarter/project.lock.json 
    log : ./src/dotnetCloudantWebstarter/project.json 
    log : Restore failed in 12032ms. 
    error: Package Microsoft.AspNetCore.Mvc.ViewFeatures 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.ViewFeatures 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: Package Microsoft.AspNetCore.Mvc.Core 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.Core 1.0.0 supports: 
    error: - net451 (.NETFramework,Version=v4.5.1) 
    error: - netstandard1.6 (.NETStandard,Version=v1.6) 
    error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    log : Writing lock file to disk. Path: /tmp/staged/app/MyProject.Core/project.lock.json 
    log : ./MyProject.Core/project.json 
    log : Restore failed in 3423ms. 
    Errors in ./MyProject.Utility/project.json 
     Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.AspNetCore.Mvc.Core 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.Core 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
    Errors in ./src/MyProject.Utility/project.json 
     Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    Errors in ./src/dotnetCloudantWebstarter/project.json 
     Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel.Loader 1.0.0-preview2-003121 supports: netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.Cli.Utils 1.0.0-preview2-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     Package cloudscribe.Web.Pagination 1.0.3 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package cloudscribe.Web.Pagination 1.0.3 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - net452 (.NETFramework,Version=v4.5.2) 
     - net46 (.NETFramework,Version=v4.6) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     Package NonFactors.Grid.Core.Mvc6 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package NonFactors.Grid.Core.Mvc6 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    Errors in ./MyProject.Core/project.json 
     Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DotNet.ProjectModel 1.0.0-rc3-003121 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
     Package Microsoft.AspNetCore.Mvc.ViewFeatures 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.ViewFeatures 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     Package Microsoft.AspNetCore.Mvc.Core 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc.Core 1.0.0 supports: 
     - net451 (.NETFramework,Version=v4.5.1) 
     - netstandard1.6 (.NETStandard,Version=v1.6) 
     One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    FAILED: command failed, exit status 1 
    FAILED: Restoring dependencies with Dotnet CLI failed, command failed, exit status 1 
Staging failed: Buildpack compilation step failed 


FAILED 
BuildpackCompileFailed 

TIP: use 'cf logs MyProject --recent' for more information 

Finished: FAILED 

我該如何解決這個錯誤?

回答

1

在框架部分project.json中爲netstandard1.6添加導入應該可以解決此問題。

例構架部分:

"frameworks": { 
    "netcoreapp1.0": { 
    "imports": [ 
     "dotnet5.6", 
     "portable-net45+win8", 
     "netstandard1.6" 
    ] 
    } 
} 

更新

你project.json還包括"1.0.0-rc2-final""1.0.0"包,恢復這些軟件包的依賴關係時幾乎肯定會導致衝突。您應該更改"1.0.0-rc2-final"參考"1.0.0""1.0.0-rc2-002702"參考"1.0.0-rc3-003121"。完成之後,使用nuget locals all -clear清除nuget包緩存,以確保這些舊的RC2包不會在緩存中殘留。

+0

Danial感謝您的回覆。 –