2016-07-28 5 views
0

저는 .NET에 익숙하지 않으며 종속성과 관련하여 이러한 종류의 문제를 디버깅하는 방법을 알지 못합니다. 나는 맥에서 dotnet 코어 응용 프로그램을 실행하려고하는데, 아래에서 실행할 때 터미널의 출력을 볼 수 있습니다. dotnet 복원 이상은 내 project.json을 볼 수 있습니다. 어떤 정보가 도움이 될지 모르겠습니다. 어떤 도움이라도 대단히 감사하겠습니다. 감사.mac에서 asp.net 코어의 종속성 충돌

log : Restoring packages for /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
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 : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
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.EntityFrameworkCore.Tools' in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
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.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.Extensions.SecretManager.Tools' in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostresolver/index.json 
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethost/index.json 
log : Restoring packages for tool 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json... 
error: Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final 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: Project JustBringUtils is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Project JustBringUtils supports: netstandard1.6 (.NETStandard,Version=v1.6) 
error: Package Microsoft.ApplicationInsights.AspNetCore 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.ApplicationInsights.AspNetCore 1.0.0 supports: 
error: - net451 (.NETFramework,Version=v4.5.1) 
error: - netstandard1.6 (.NETStandard,Version=v1.6) 
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.VisualStudio.Web.CodeGenerators.Mvc 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 1.0.0-preview2-final 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: 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.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final supports: 
error: - net451 (.NETFramework,Version=v4.5.1) 
error: - netstandard1.6 (.NETStandard,Version=v1.6) 
error: One or more projects are incompatible with .NETCoreApp,Version=v1.0. 
error: One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
info : Committing restore... 
log : Lock file has not changed. Skipping lock file write. Path: /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.lock.json 
log : /Users/dimitris/Develop/JustBringCore/src/JustBringCore/project.json 
log : Restore failed in 6812ms. 

Errors in /Users/dimitris/Develop/JustBringCore/src/JustBringCore/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.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) 
    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.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final supports: 
    - net451 (.NETFramework,Version=v4.5.1) 
    - netstandard1.6 (.NETStandard,Version=v1.6) 
    One or more packages are incompatible with .NETCoreApp,Version=v1.0. 
    Project JustBringUtils is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Project JustBringUtils supports: netstandard1.6 (.NETStandard,Version=v1.6) 
    Package Microsoft.ApplicationInsights.AspNetCore 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.ApplicationInsights.AspNetCore 1.0.0 supports: 
    - net451 (.NETFramework,Version=v4.5.1) 
    - netstandard1.6 (.NETStandard,Version=v1.6) 
    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.VisualStudio.Web.CodeGenerators.Mvc 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 1.0.0-preview2-final 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) 
    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) 
    Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.VisualStudio.Web.CodeGeneration 1.0.0-preview2-final supports: 
    - net451 (.NETFramework,Version=v4.5.1) 
    - netstandard1.6 (.NETStandard,Version=v1.6) 
    One or more projects are incompatible with .NETCoreApp,Version=v1.0. 
    One or more packages are incompatible with .NETCoreApp,Version=v1.0. 

NuGet Config files used: 
    /Users/dimitris/.nuget/NuGet/NuGet.Config 

Feeds used: 
    https://api.nuget.org/v3/index.json 

project.json

{ 
    "userSecretsId": "aspnet-JustBringCore-...", 

    "dependencies": { 
    "CsvHelper": "2.16.0", 
    "JustBringUtils": "1.0.0-*", 
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", 
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.0.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0", 
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", 
    "Microsoft.AspNetCore.Mvc": "1.0.0", 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", 
    "Microsoft.AspNetCore.StaticFiles": "1.0.0", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0", 
    "Microsoft.Extensions.Logging": "1.0.0", 
    "Microsoft.Extensions.Logging.Console": "1.0.0", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0", 
    "Microsoft.NETCore.App": { 
     "version": "1.0.0", 
     "type": "platform" 
    }, 
    "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" 
    }, 
    "Stripe.net": "6.3.5" 
    }, 

    "tools": { 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": "portable-net45+win8+dnxcore50" 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": "portable-net45+win8+dnxcore50" 
    }, 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": [ 
     "portable-net45+win8+dnxcore50", 
     "portable-net45+win8" 
     ] 
    }, 
    "Microsoft.Extensions.SecretManager.Tools": { 
     "version": "1.0.0-preview1-final", 
     "imports": "portable-net45+win8+dnxcore50" 
    }, 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": [ 
     "portable-net45+win8+dnxcore50", 
     "portable-net45+win8" 
     ] 
    } 
    }, 

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

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "runtimeOptions": { 
    "gcServer": true 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    } 
} 

답변

0

dotnet restore하면 오류의 무리를 덤프하고, 확인할 수있는 몇 가지가있다.

먼저 dotnet의 최신 버전을 사용하고 있는지 확인하십시오

λ dotnet --version 
1.0.0-preview2-003121 

다음, 당신은 사람들이 복원을 깨고 하나 하나 확인하는 잘못된 패키지를 제거 시작할 수 있습니다. 몇 개조하면 되겠으로, 나는 성공적으로 project.json로 복원 할 수 있었다 :

원본 파일에서
{ 
    "userSecretsId": "aspnet-JustBringCore-...", 

    "dependencies": { 
    "CsvHelper": "2.16.0", 
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", 
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.0.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0", 
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", 
    "Microsoft.AspNetCore.Mvc": "1.0.0", 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", 
    "Microsoft.AspNetCore.StaticFiles": "1.0.0", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build" 
    }, 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0", 
    "Microsoft.Extensions.Logging": "1.0.0", 
    "Microsoft.Extensions.Logging.Console": "1.0.0", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0", 
    "Microsoft.NETCore.App": { 
     "version": "1.0.0", 
     "type": "platform" 
    }, 
    "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" 
    }, 
    "Stripe.net": "6.3.5" 
    }, 

    "tools": { 
    "Microsoft.AspNetCore.Razor.Tools": { 
     "version": "1.0.0-preview2-final", 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": { 
     "version": "1.0.0-preview2-final", 
    }, 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
    }, 
    "Microsoft.Extensions.SecretManager.Tools": { 
     "version": "1.0.0-preview2-final", 
    }, 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.0.0-preview2-final", 
     "imports": "portable-net45+win8+wp8+wpa81" 
    } 
    }, 

    "frameworks": { 
    "netcoreapp1.0": { 
     "imports": [ 
     "dotnet5.4", 
     "portable-net45+win8+wp8+wpa81" 
     ] 
    } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "runtimeOptions": { 
    "gcServer": true 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    } 
} 

, Microsoft.Extensions.SecretManager.Tools 날짜 중 1 개 버전이었다.