2 votes

Erreur lors du déploiement d'une application Asp.net core avec plusieurs solutions sur Bluemix

Lorsque j'essaie de construire et de déployer une application Asp.net core avec plusieurs solutions sur Bluemix, j'obtiens le journal d'erreurs suivant :

-----> 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

Comment puis-je résoudre cette erreur ?

1voto

Daniel Grim Points 2133

Ajout d'une importation pour netstandard1.6 dans votre section "cadres" de project.json devrait résoudre ce problème.

Exemple de section de cadres :

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

Mise à jour

Votre project.json inclut également des paquets provenant de "1.0.0-rc2-final" y "1.0.0" qui provoquera très certainement des conflits lors de la restauration des dépendances de ces paquets. Vous devez modifier le "1.0.0-rc2-final" références à "1.0.0" et le "1.0.0-rc2-002702" références à "1.0.0-rc3-003121" . Après avoir fait cela, videz votre cache de paquets nuget en utilisant nuget locals all -clear pour s'assurer que ces anciens paquets RC2 ne restent pas dans le cache.

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X